MCPcopy
hub / github.com/psycopg/psycopg / test_fetchone

Function test_fetchone

tests/test_cursor_common.py:303–311  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

301
302
303def test_fetchone(conn):
304 cur = conn.cursor()
305 cur.execute(ph(cur, "select %s::int, %s::text, %s::text"), [1, "foo", None])
306 assert cur.pgresult.fformat(0) == 0
307
308 row = cur.fetchone()
309 assert row == (1, "foo", None)
310 row = cur.fetchone()
311 assert row is None
312
313
314def test_binary_cursor_execute(conn):

Callers

nothing calls this directly

Calls 5

phFunction · 0.85
cursorMethod · 0.45
executeMethod · 0.45
fformatMethod · 0.45
fetchoneMethod · 0.45

Tested by

no test coverage detected