diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-07-29 07:47:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 07:47:56 (GMT) |
commit | 5269c091458c5ea76eb625e4fabc9980b6309266 (patch) | |
tree | 2c39bdae29af27e9232facd337a41c5163bf0538 /Lib/sqlite3 | |
parent | 8d0647485db5af2a0f0929d6509479ca45f1281b (diff) | |
download | cpython-5269c091458c5ea76eb625e4fabc9980b6309266.zip cpython-5269c091458c5ea76eb625e4fabc9980b6309266.tar.gz cpython-5269c091458c5ea76eb625e4fabc9980b6309266.tar.bz2 |
bpo-44688: Remove ASCII limitation from `sqlite3` collation names (GH-27395)
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/test/hooks.py | 3 | ||||
-rw-r--r-- | Lib/sqlite3/test/regression.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index 520a5b9..1be6d38 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -40,8 +40,7 @@ class CollationTests(unittest.TestCase): def test_create_collation_not_ascii(self): con = sqlite.connect(":memory:") - with self.assertRaises(sqlite.ProgrammingError): - con.create_collation("collä", lambda x, y: (x > y) - (x < y)) + con.create_collation("collä", lambda x, y: (x > y) - (x < y)) def test_create_collation_bad_upper(self): class BadUpperStr(str): diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 417a531..6c093d7 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -278,7 +278,7 @@ class RegressionTests(unittest.TestCase): def test_collation(self): def collation_cb(a, b): return 1 - self.assertRaises(sqlite.ProgrammingError, self.con.create_collation, + self.assertRaises(UnicodeEncodeError, self.con.create_collation, # Lone surrogate cannot be encoded to the default encoding (utf8) "\uDC80", collation_cb) |