diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2022-03-03 13:54:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-03 13:54:36 (GMT) |
commit | 88567a997005c9388137cd18c5d7f4483423dac3 (patch) | |
tree | 579796d07fdf12488a06fa4b676229f11f253414 /Lib/test/test_sqlite3/test_userfunctions.py | |
parent | 751c9ed801ad1189272ca10f0749bfc9d49b5038 (diff) | |
download | cpython-88567a997005c9388137cd18c5d7f4483423dac3.zip cpython-88567a997005c9388137cd18c5d7f4483423dac3.tar.gz cpython-88567a997005c9388137cd18c5d7f4483423dac3.tar.bz2 |
bpo-46874: Speed up sqlite3 user-defined aggregate 'step' method (GH-31604)
Diffstat (limited to 'Lib/test/test_sqlite3/test_userfunctions.py')
-rw-r--r-- | Lib/test/test_sqlite3/test_userfunctions.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_sqlite3/test_userfunctions.py b/Lib/test/test_sqlite3/test_userfunctions.py index 23ecfb4..2588cae 100644 --- a/Lib/test/test_sqlite3/test_userfunctions.py +++ b/Lib/test/test_sqlite3/test_userfunctions.py @@ -502,11 +502,13 @@ class AggregateTests(unittest.TestCase): with self.assertRaises(sqlite.OperationalError): self.con.create_function("bla", -100, AggrSum) + @with_tracebacks(AttributeError, name="AggrNoStep") def test_aggr_no_step(self): cur = self.con.cursor() - with self.assertRaises(AttributeError) as cm: + with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select nostep(t) from test") - self.assertEqual(str(cm.exception), "'AggrNoStep' object has no attribute 'step'") + self.assertEqual(str(cm.exception), + "user-defined aggregate's 'step' method not defined") def test_aggr_no_finalize(self): cur = self.con.cursor() |