summaryrefslogtreecommitdiff
path: root/tests/test_green.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-15 00:58:32 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-15 00:58:32 +0100
commitb205764fdde4549c48c27841aa17e6c7f499e808 (patch)
tree1475eb57dc854ea4a1dc93c1c6a567e6fc584e5c /tests/test_green.py
parente7227ce87b8da75fef1a3376ebb47e2bf20f6063 (diff)
parent7a5edff6c66a0410d6fecd4445980aabafc3ab4a (diff)
downloadpsycopg2-errors-module.tar.gz
Merge branch 'master' into errors-moduleerrors-module
Diffstat (limited to 'tests/test_green.py')
-rwxr-xr-xtests/test_green.py8
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):