Skip to content

Commit 06586a1

Browse files
committed
Python: merge tests files
1 parent 826f44d commit 06586a1

File tree

2 files changed

+11
-29
lines changed

2 files changed

+11
-29
lines changed

python/ql/test/library-tests/frameworks/asyncpg/FileSystemAccess.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

python/ql/test/library-tests/frameworks/asyncpg/SqlExecution.py renamed to python/ql/test/library-tests/frameworks/asyncpg/asyncpg.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ async def test_connection():
55
conn = await asyncpg.connect()
66

77
try:
8+
# The file-like object is passed in as a keyword-only argument.
9+
# See https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.connection.Connection.copy_from_query
810
await conn.copy_from_query("sql", output="filepath") # $ getSql="sql" getAPathArgument="filepath"
11+
await conn.copy_from_query("sql", "arg1", "arg2", output="filepath") # $ getSql="sql" getAPathArgument="filepath"
12+
13+
await conn.copy_from_table("table", output="filepath") # $ getAPathArgument="filepath"
14+
await conn.copy_to_table("table", source="filepath") # $ getAPathArgument="filepath"
15+
916
await conn.execute("sql") # $ getSql="sql"
1017
await conn.executemany("sql") # $ getSql="sql"
1118
await conn.fetch("sql") # $ getSql="sql"
@@ -63,6 +70,10 @@ async def test_connection_pool():
6370

6471
try:
6572
await pool.copy_from_query("sql", output="filepath") # $ getSql="sql" getAPathArgument="filepath"
73+
await pool.copy_from_query("sql", "arg1", "arg2", output="filepath") # $ getSql="sql" getAPathArgument="filepath"
74+
await pool.copy_from_table("table", output="filepath") # $ getAPathArgument="filepath"
75+
await pool.copy_to_table("table", source="filepath") # $ getAPathArgument="filepath"
76+
6677
await pool.execute("sql") # $ getSql="sql"
6778
await pool.executemany("sql") # $ getSql="sql"
6879
await pool.fetch("sql") # $ getSql="sql"

0 commit comments

Comments
 (0)