mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fix a variable scoping error in an sqlite3 test
Initial patch by Torsten Landschoff. Closes #11689.
This commit is contained in:
parent
e6010061fc
commit
437b149b0c
3 changed files with 7 additions and 3 deletions
|
|
@ -166,14 +166,14 @@ class ProgressTests(unittest.TestCase):
|
|||
Test that setting the progress handler to None clears the previously set handler.
|
||||
"""
|
||||
con = sqlite.connect(":memory:")
|
||||
action = 0
|
||||
action = []
|
||||
def progress():
|
||||
action = 1
|
||||
action.append(1)
|
||||
return 0
|
||||
con.set_progress_handler(progress, 1)
|
||||
con.set_progress_handler(None, 1)
|
||||
con.execute("select 1 union select 2 union select 3").fetchall()
|
||||
self.assertEqual(action, 0, "progress handler was not cleared")
|
||||
self.assertEqual(len(action), 0, "progress handler was not cleared")
|
||||
|
||||
def suite():
|
||||
collation_suite = unittest.makeSuite(CollationTests, "Check")
|
||||
|
|
|
|||
|
|
@ -475,6 +475,7 @@ Vladimir Kushnir
|
|||
Kirill Kuzminykh (Кирилл Кузьминых)
|
||||
Ross Lagerwall
|
||||
Cameron Laird
|
||||
Torsten Landschoff
|
||||
Łukasz Langa
|
||||
Tino Lange
|
||||
Andrew Langmead
|
||||
|
|
|
|||
|
|
@ -526,6 +526,9 @@ Tools/Demos
|
|||
Tests
|
||||
-----
|
||||
|
||||
- Issue #11689: Fix a variable scoping error in an sqlite3 test.
|
||||
Initial patch by Torsten Landschoff.
|
||||
|
||||
- Issue #13304: Skip test case if user site-packages disabled (-s or
|
||||
PYTHONNOUSERSITE). (Patch by Carl Meyer)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue