Skip to content

Commit d43ef44

Browse files
committed
Add a test
1 parent c78eec1 commit d43ef44

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_copy.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,22 @@ async def test_copy_from_query_with_args(self):
148148

149149
res = await self.con.copy_from_query('''
150150
SELECT
151-
i, i * 10
151+
i,
152+
i * 10,
153+
$2::text
152154
FROM
153155
generate_series(1, 5) AS i
154156
WHERE
155157
i = $1
156-
''', 3, output=f)
158+
''', 3, None, output=f)
157159

158160
self.assertEqual(res, 'COPY 1')
159161

160162
output = f.getvalue().decode().split('\n')
161163
self.assertEqual(
162164
output,
163165
[
164-
'3\t30',
166+
'3\t30\t\\N',
165167
''
166168
]
167169
)

0 commit comments

Comments
 (0)