Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite: Incorrect unit test fails to detect failure #55898

Closed
Bluehorn mannequin opened this issue Mar 26, 2011 · 5 comments
Closed

sqlite: Incorrect unit test fails to detect failure #55898

Bluehorn mannequin opened this issue Mar 26, 2011 · 5 comments
Labels
tests Tests in the Lib/test dir

Comments

@Bluehorn
Copy link
Mannequin

Bluehorn mannequin commented Mar 26, 2011

BPO 11689
Nosy @sandrotosi, @Bluehorn, @akheron
Files
  • test_clear_handler_py3.diff: Patch for Python 3
  • test_clear_handler_py27.diff: Patch for Python 2.7
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-02-17.19:47:55.088>
    created_at = <Date 2011-03-26.22:28:40.260>
    labels = ['tests']
    title = 'sqlite: Incorrect unit test fails to detect failure'
    updated_at = <Date 2012-02-17.19:50:48.900>
    user = 'https://github.com/Bluehorn'

    bugs.python.org fields:

    activity = <Date 2012-02-17.19:50:48.900>
    actor = 'petri.lehtinen'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-02-17.19:47:55.088>
    closer = 'python-dev'
    components = ['Tests']
    creation = <Date 2011-03-26.22:28:40.260>
    creator = 'torsten'
    dependencies = []
    files = ['21415', '21416']
    hgrepos = []
    issue_num = 11689
    keywords = ['patch']
    message_count = 5.0
    messages = ['132278', '139175', '153537', '153594', '153595']
    nosy_count = 5.0
    nosy_names = ['ghaering', 'sandro.tosi', 'torsten', 'python-dev', 'petri.lehtinen']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue11689'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @Bluehorn
    Copy link
    Mannequin Author

    Bluehorn mannequin commented Mar 26, 2011

    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.

    @Bluehorn Bluehorn mannequin added the tests Tests in the Lib/test dir label Mar 26, 2011
    @sandrotosi
    Copy link
    Contributor

    I've commented on the Rietveld review page - forgive me if I missed something and didn't get the patch meaning right.

    @akheron
    Copy link
    Member

    akheron commented Feb 17, 2012

    In python 3, declaring the action nonlocal inside the progress function would be more clever :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 17, 2012

    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

    @python-dev python-dev mannequin closed this as completed Feb 17, 2012
    @akheron
    Copy link
    Member

    akheron commented Feb 17, 2012

    Fixed, thanks for the patches!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants