Skip to content

Commit b1edeea

Browse files
committed
Add explicit checks for the number of prepared statements.
1 parent 6ba3ae2 commit b1edeea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_introspection.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ async def test_introspection_no_stmt_cache_01(self):
6262
DROP EXTENSION hstore
6363
''')
6464

65+
self.assertEqual(self.con._uid, 0)
66+
6567
@tb.with_connection_options(max_cacheable_statement_size=1)
6668
async def test_introspection_no_stmt_cache_02(self):
6769
# max_cacheable_statement_size will disable caching both for
@@ -80,9 +82,13 @@ async def test_introspection_no_stmt_cache_02(self):
8082
DROP EXTENSION hstore
8183
''')
8284

85+
self.assertEqual(self.con._uid, 0)
86+
8387
@tb.with_connection_options(max_cacheable_statement_size=10000)
8488
async def test_introspection_no_stmt_cache_03(self):
8589
# max_cacheable_statement_size will disable caching for
8690
# the user query but not for the introspection query.
8791
await self.con.fetchval(
8892
"SELECT $1::int[], '{foo}'".format(foo='a' * 10000), [1, 2])
93+
94+
self.assertEqual(self.con._uid, 1)

0 commit comments

Comments
 (0)