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

Function test_binary_prefix

tests/test_cursor.py:227–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225
226
227def test_binary_prefix():
228 # https://github.com/PyMySQL/mysqlclient/issues/494
229 conn = connect(binary_prefix=True)
230 cursor = conn.cursor()
231
232 cursor.execute("DROP TABLE IF EXISTS test_binary_prefix")
233 cursor.execute(
234 """\
235CREATE TABLE test_binary_prefix (
236 id INTEGER NOT NULL AUTO_INCREMENT,
237 json JSON NOT NULL,
238 PRIMARY KEY (id)
239) CHARSET=utf8mb4"""
240 )
241
242 cursor.executemany(
243 "INSERT INTO test_binary_prefix (id, json) VALUES (%(id)s, %(json)s)",
244 ({"id": 1, "json": "{}"}, {"id": 2, "json": "{}"}),
245 )

Callers

nothing calls this directly

Calls 4

cursorMethod · 0.80
executeMethod · 0.80
executemanyMethod · 0.80
connectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…