MCPcopy
hub / github.com/psycopg/psycopg / test_mogrify_badenc

Function test_mogrify_badenc

tests/test_cursor_client.py:145–148  ·  view source on GitHub ↗
(conn, encoding)

Source from the content-addressed store, hash-verified

143
144@pytest.mark.parametrize("encoding", [crdb_encoding("latin1")])
145def test_mogrify_badenc(conn, encoding):
146 conn.execute(f"set client_encoding to {encoding}")
147 with pytest.raises(UnicodeEncodeError):
148 conn.cursor().mogrify("select %(s)s", {"s": "€"})

Callers

nothing calls this directly

Calls 3

mogrifyMethod · 0.80
executeMethod · 0.45
cursorMethod · 0.45

Tested by

no test coverage detected