diff options
Diffstat (limited to 'tests/test_copy.py')
-rwxr-xr-x | tests/test_copy.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_copy.py b/tests/test_copy.py index 9026abc..7ec1b76 100755 --- a/tests/test_copy.py +++ b/tests/test_copy.py @@ -244,6 +244,15 @@ class CopyTests(unittest.TestCase): self.assertEqual(ntests, len(string.ascii_letters)) + def test_copy_expert_file_refcount(self): + class Whatever(object): + pass + + f = Whatever() + curs = self.conn.cursor() + self.assertRaises(TypeError, + curs.copy_expert, 'COPY tcopy (data) FROM STDIN', f) + decorate_all_tests(CopyTests, skip_if_green) |