MCPcopy Index your code
hub / github.com/PyMySQL/mysqlclient / test_pyparam

Function test_pyparam

tests/test_cursor.py:106–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105
106def test_pyparam():
107 conn = connect()
108 cursor = conn.cursor()
109
110 cursor.execute("SELECT %(a)s, %(b)s", {"a": 1, "b": 2})
111 assert cursor._executed == b"SELECT 1, 2"
112 cursor.execute(b"SELECT %(a)s, %(b)s", {b"a": 3, b"b": 4})
113 assert cursor._executed == b"SELECT 3, 4"
114
115
116def test_dictcursor():

Callers

nothing calls this directly

Calls 3

cursorMethod · 0.80
executeMethod · 0.80
connectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…