summaryrefslogtreecommitdiff
path: root/tests/test_cursor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cursor.py')
-rwxr-xr-xtests/test_cursor.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_cursor.py b/tests/test_cursor.py
index ec76918..cc8db0f 100755
--- a/tests/test_cursor.py
+++ b/tests/test_cursor.py
@@ -118,6 +118,12 @@ class CursorTests(ConnectingTestCase):
nref2 = sys.getrefcount(foo)
self.assertEqual(nref1, nref2)
+ def test_modify_closed(self):
+ cur = self.conn.cursor()
+ cur.close()
+ sql = cur.mogrify("select %s", (10,))
+ self.assertEqual(sql, b"select 10")
+
def test_bad_placeholder(self):
cur = self.conn.cursor()
self.assertRaises(psycopg2.ProgrammingError,