MCPcopy Index your code
hub / github.com/dbcli/mycli / test_binary

Function test_binary

test/pytests/test_sqlexecute.py:107–118  ·  view source on GitHub ↗
(executor)

Source from the content-addressed store, hash-verified

105
106@dbtest
107def test_binary(executor):
108 run(executor, """create table bt(geom linestring NOT NULL)""")
109 run(executor, "INSERT INTO bt VALUES (ST_GeomFromText('LINESTRING(116.37604 39.73979,116.375 39.73965)'));")
110 results = run(executor, """select * from bt""")
111
112 geom = (
113 b"\x00\x00\x00\x00\x01\x02\x00\x00\x00\x02\x00\x00\x009\x7f\x13\n"
114 b"\x11\x18]@4\xf4Op\xb1\xdeC@\x00\x00\x00\x00\x00\x18]@B>\xe8\xd9"
115 b"\xac\xdeC@"
116 )
117
118 assert_result_equal(results, header=["geom"], rows=[(geom,)])
119
120
121@dbtest

Callers

nothing calls this directly

Calls 2

runFunction · 0.90
assert_result_equalFunction · 0.85

Tested by

no test coverage detected