diff options
Diffstat (limited to 'tests/test_green.py')
-rwxr-xr-x | tests/test_green.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_green.py b/tests/test_green.py index 65f483c..b726c46 100755 --- a/tests/test_green.py +++ b/tests/test_green.py @@ -27,7 +27,7 @@ import psycopg2 import psycopg2.extensions import psycopg2.extras -from .testutils import ConnectingTestCase, slow +from .testutils import ConnectingTestCase, skip_before_postgres, slow class ConnectionStub(object): @@ -111,6 +111,12 @@ class GreenTestCase(ConnectingTestCase): curs.execute("select 1") self.assertEqual(curs.fetchone()[0], 1) + @skip_before_postgres(8, 2) + def test_copy_no_hang(self): + cur = self.conn.cursor() + self.assertRaises(psycopg2.ProgrammingError, + cur.execute, "copy (select 1) to stdout") + class CallbackErrorTestCase(ConnectingTestCase): def setUp(self): |