8000 bpo-42264: Deprecate sqlite3.OptimizedUnicode by erlend-aasland · Pull Request #23163 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-42264: Deprecate sqlite3.OptimizedUnicode #23163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 17, 2020
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
< 7372 /div>
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
0