Skip to content
Prev Previous commit
Next Next commit
Restore type checks in unit test
  • Loading branch information
Erlend E. Aasland committed Nov 5, 2020
commit f25e85ab6402da2d355c35e73216a3e2666f92ab
6 changes: 4 additions & 2 deletions Lib/sqlite3/test/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ def CheckOptimizedUnicode(self):
self.con.text_factory = sqlite.OptimizedUnicode
austria = "�sterreich"
germany = "Deutchland"
self.con.execute("select ?", (austria,)).fetchone()
self.con.execute("select ?", (germany,)).fetchone()
a_row = self.con.execute("select ?", (austria,)).fetchone()
d_row = self.con.execute("select ?", (germany,)).fetchone()
self.assertEqual(type(a_row[0]), str, "type of non-ASCII row must be str")
self.assertEqual(type(d_row[0]), str, "type of ASCII-only row must be str")

def tearDown(self):
self.con.close()
Expand Down