This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sqlite: Incorrect unit test fails to detect failure
Type: Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ghaering, petri.lehtinen, python-dev, sandro.tosi, torsten
Priority: normal Keywords: patch

Created on 2011-03-26 22:28 by torsten, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_clear_handler_py3.diff torsten, 2011-03-26 22:28 Patch for Python 3 review
test_clear_handler_py27.diff torsten, 2011-03-26 22:29 Patch for Python 2.7 review
Messages (5)
msg132278 - (view) Author: Torsten Landschoff (torsten) * Date: 2011-03-26 22:28
The CheckClearHandler test in Lib/sqlite3/test/hooks.py is invalid. It sets a local variable in a callback where it wants to change the variable in the closure.

Patch attached.
msg139175 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-06-26 13:00
I've commented on the Rietveld review page - forgive me if I missed something and didn't get the patch meaning right.
msg153537 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-02-17 10:55
In python 3, declaring the action nonlocal inside the progress function would be more clever :)
msg153594 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-17 19:47
New changeset bf7226719aec by Petri Lehtinen in branch '3.2':
Fix a variable scoping error in an sqlite3 test
http://hg.python.org/cpython/rev/bf7226719aec

New changeset ce023c95db9f by Petri Lehtinen in branch '2.7':
Fix a variable scoping error in an sqlite3 test
http://hg.python.org/cpython/rev/ce023c95db9f

New changeset 6b834e3c0882 by Petri Lehtinen in branch 'default':
Merge branch '3.2'
http://hg.python.org/cpython/rev/6b834e3c0882
msg153595 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-02-17 19:50
Fixed, thanks for the patches!
History
Date User Action Args
2022-04-11 14:57:15adminsetgithub: 55898
2012-02-17 19:50:48petri.lehtinensetmessages: + msg153595
2012-02-17 19:47:55python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg153594

resolution: fixed
stage: patch review -> resolved
2012-02-17 10:55:56petri.lehtinensetmessages: + msg153537
2012-02-08 20:34:00petri.lehtinensetnosy: + petri.lehtinen
2011-06-26 13:00:35sandro.tosisetversions: + Python 3.2
nosy: + sandro.tosi

messages: + msg139175

stage: patch review
2011-05-27 23:15:51ned.deilysetnosy: + ghaering
2011-03-26 22:29:57torstensetfiles: + test_clear_handler_py27.diff
2011-03-26 22:28:40torstencreate