summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-04-14 11:18:49 (GMT)
committerGitHub <noreply@github.com>2021-04-14 11:18:49 (GMT)
commit6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082 (patch)
tree59b420c5e232bd9d6f2050ba0c7e1fb5754f0272 /Lib/sqlite3
parent333d10cbb53dd5f28d76f659a49bf0735f8509d8 (diff)
downloadcpython-6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082.zip
cpython-6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082.tar.gz
cpython-6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082.tar.bz2
bpo-43752: Fix sqlite3 regression for zero-sized blobs with converters (GH-25228)
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r--Lib/sqlite3/test/types.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py
index 2370dd1..4bb1de8 100644
--- a/Lib/sqlite3/test/types.py
+++ b/Lib/sqlite3/test/types.py
@@ -255,7 +255,9 @@ class DeclTypesTests(unittest.TestCase):
def test_convert_zero_sized_blob(self):
self.con.execute("insert into test(cbin) values (?)", (b"",))
cur = self.con.execute("select cbin from test")
- self.assertEqual(cur.fetchone()[0], b"blobish")
+ # Zero-sized blobs with converters returns None. This differs from
+ # blobs without a converter, where b"" is returned.
+ self.assertIsNone(cur.fetchone()[0])
class ColNamesTests(unittest.TestCase):