MCPcopy
hub / github.com/psycopg/psycopg / test_execute_sequence

Function test_execute_sequence

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

Source from the content-addressed store, hash-verified

251
252
253def test_execute_sequence(conn):
254 cur = conn.cursor()
255 rv = cur.execute(ph(cur, "select %s::int, %s::text, %s::text"), [1, "foo", None])
256 assert rv is cur
257 assert len(cur._results) == 1
258 assert cur.pgresult.get_value(0, 0) == b"1"
259 assert cur.pgresult.get_value(0, 1) == b"foo"
260 assert cur.pgresult.get_value(0, 2) is None
261 assert cur.nextset() is None
262
263
264@pytest.mark.parametrize("query", ["", " ", ";"])

Callers

nothing calls this directly

Calls 5

phFunction · 0.85
nextsetMethod · 0.80
cursorMethod · 0.45
executeMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected