8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fa7b14 commit 2b14488Copy full SHA for 2b14488
pymysql/tests/test_basic.py
@@ -91,8 +91,20 @@ def test_integer(self):
91
finally:
92
c.execute("drop table test_dict")
93
94
- def test_blob(self):
+ def test_binary(self):
95
"""test binary data"""
96
+ data = bytes(bytearray(range(255)))
97
+ conn = self.connections[0]
98
+ self.safe_create_table(
99
+ conn, "test_binary", "create table test_binary (b binary(255))")
100
+
101
+ with conn.cursor() as c:
102
+ c.execute("insert into test_binary (b) values (%s)", (data,))
103
+ c.execute("select b from test_binary")
104
+ self.assertEqual(data, c.fetchone()[0])
105
106
+ def test_blob(self):
107
+ """test blob data"""
108
data = bytes(bytearray(range(256)) * 4)
109
conn = 4090 self.connections[0]
110
self.safe_create_table(
0 commit comments