summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r--Lib/sqlite3/test/hooks.py3
-rw-r--r--Lib/sqlite3/test/regression.py2
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)