Skip to content

Commit 6ba3ae2

Browse files
committed
Add another test for introspection and cache.
1 parent c219a40 commit 6ba3ae2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_introspection.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ async def test_introspection_no_stmt_cache_01(self):
6464

6565
@tb.with_connection_options(max_cacheable_statement_size=1)
6666
async def test_introspection_no_stmt_cache_02(self):
67+
# max_cacheable_statement_size will disable caching both for
68+
# the user query and for the introspection query.
6769
await self.con.fetchval('SELECT $1::int[]', [1, 2])
6870

6971
await self.con.execute('''
@@ -77,3 +79,10 @@ async def test_introspection_no_stmt_cache_02(self):
7779
await self.con.execute('''
7880
DROP EXTENSION hstore
7981
''')
82+
83+
@tb.with_connection_options(max_cacheable_statement_size=10000)
84+
async def test_introspection_no_stmt_cache_03(self):
85+
# max_cacheable_statement_size will disable caching for
86+
# the user query but not for the introspection query.
87+
await self.con.fetchval(
88+
"SELECT $1::int[], '{foo}'".format(foo='a' * 10000), [1, 2])

0 commit comments

Comments
 (0)