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

readline.clear_history() missing in test_readline.py #59825

Closed
apalala mannequin opened this issue Aug 10, 2012 · 6 comments
Closed

readline.clear_history() missing in test_readline.py #59825

apalala mannequin opened this issue Aug 10, 2012 · 6 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@apalala
Copy link
Mannequin

apalala mannequin commented Aug 10, 2012

BPO 15620
Nosy @apalala
Files
  • readline_clear_history_available.patch: Check if clear_history() is available before calling it.
  • 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-08-11.08:59:32.210>
    created_at = <Date 2012-08-10.21:49:13.096>
    labels = ['type-bug', 'tests']
    title = 'readline.clear_history() missing in test_readline.py'
    updated_at = <Date 2012-08-11.09:07:51.224>
    user = 'https://github.com/apalala'

    bugs.python.org fields:

    activity = <Date 2012-08-11.09:07:51.224>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-08-11.08:59:32.210>
    closer = 'python-dev'
    components = ['Tests']
    creation = <Date 2012-08-10.21:49:13.096>
    creator = 'apalala'
    dependencies = []
    files = ['26762']
    hgrepos = []
    issue_num = 15620
    keywords = ['patch']
    message_count = 6.0
    messages = ['167919', '167920', '167922', '167923', '167941', '167942']
    nosy_count = 2.0
    nosy_names = ['python-dev', 'apalala']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15620'
    versions = ['Python 2.7']

    @apalala
    Copy link
    Mannequin Author

    apalala mannequin commented Aug 10, 2012

    $ lsb_release -a
    LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
    Distributor ID:	Ubuntu
    Description:	Ubuntu 12.04.1 LTS
    Release:	12.04
    Codename:	precise
    
    $ hg branch
    2.7
    
    $ ./python Lib/test/test_readline.py
    testHistoryUpdates (__main__.TestHistoryManipulation) ... ERROR

    ======================================================================
    ERROR: testHistoryUpdates (main.TestHistoryManipulation)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_readline.py", line 16, in testHistoryUpdates
        readline.clear_history()
    AttributeError: 'module' object has no attribute 'clear_history'

    Ran 1 test in 0.003s

    FAILED (errors=1)
    Traceback (most recent call last):
      File "Lib/test/test_readline.py", line 43, in <module>
        test_main()
      File "Lib/test/test_readline.py", line 40, in test_main
        run_unittest(TestHistoryManipulation)
      File "/art/python/cpython/Lib/test/test_support.py", line 1125, in run_unittest
        _run_suite(suite)
      File "/art/python/cpython/Lib/test/test_support.py", line 1108, in _run_suite
        raise TestFailed(err)
    test.test_support.TestFailed: Traceback (most recent call last):
      File "Lib/test/test_readline.py", line 16, in testHistoryUpdates
        readline.clear_history()
    AttributeError: 'module' object has no attribute 'clear_history'

    @apalala apalala mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Aug 10, 2012
    @apalala
    Copy link
    Mannequin Author

    apalala mannequin commented Aug 10, 2012

    $ dpkg -l | grep readline
    ii  libreadline-dev                                             6.2-8                                   GNU readline and history libraries, development files
    ii  libreadline5                                                5.2-11                                  GNU readline and history libraries, run-time libraries
    ii  libreadline6                                                6.2-8                                   GNU readline and history libraries, run-time libraries
    ii  libreadline6-dev                                            6.2-8                                   GNU readline and history libraries, development files
    ii  readline-common                                             6.2-8                                   GNU readline and history libraries, common files

    @apalala
    Copy link
    Mannequin Author

    apalala mannequin commented Aug 10, 2012

    Check if clear_history() is available before calling it.

    1 similar comment
    @apalala
    Copy link
    Mannequin Author

    apalala mannequin commented Aug 10, 2012

    Check if clear_history() is available before calling it.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 11, 2012

    New changeset 961a15aff2a6 by Georg Brandl in branch '3.2':
    Closes bpo-15620: check for presence of readline.clear_history(), which is apparently missing on some readline versions, before calling it in the test.
    http://hg.python.org/cpython/rev/961a15aff2a6

    @python-dev python-dev mannequin closed this as completed Aug 11, 2012
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 11, 2012

    New changeset dda08ec9fbd5 by Georg Brandl in branch '2.7':
    Graft a89d654adaa2 from 3.2 branch. Fixes bpo-15620.
    http://hg.python.org/cpython/rev/dda08ec9fbd5

    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants