bpo-43368: Fix fetching empty bytes in sqlite3 (GH-24706)

Regression introduced in 47feb1feb2.
This commit is contained in:
Mariusz Felisiak 2021-03-03 15:16:24 +01:00 committed by GitHub
parent 09605ad726
commit 3b4b2cf418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -409,6 +409,10 @@ class RegressionTests(unittest.TestCase):
self.con.execute("select 1") # trigger seg fault
method(None)
def test_return_empty_bytestring(self):
cur = self.con.execute("select X''")
val = cur.fetchone()[0]
self.assertEqual(val, b'')
def suite():