Kaydet (Commit) 502ff6c9 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #10811: Use TestCase.assertRaises() in the new test

üst 8f9f8d61
......@@ -298,11 +298,10 @@ class RegressionTests(unittest.TestCase):
cur.execute("insert into a (bar) values (?)", (1,))
yield 1
try:
cur.executemany("insert into b (baz) values (?)", ((i,) for i in foo()))
self.fail("should have raised ProgrammingError")
except sqlite.ProgrammingError:
pass
with self.assertRaises(sqlite.ProgrammingError):
cur.executemany("insert into b (baz) values (?)",
((i,) for i in foo()))
def suite():
regression_suite = unittest.makeSuite(RegressionTests, "Check")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment