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

test_errno fails with unexpected error value EREMOTEIO #46650

Closed
andybalaam mannequin opened this issue Mar 18, 2008 · 4 comments
Closed

test_errno fails with unexpected error value EREMOTEIO #46650

andybalaam mannequin opened this issue Mar 18, 2008 · 4 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@andybalaam
Copy link
Mannequin

andybalaam mannequin commented Mar 18, 2008

BPO 2398
Nosy @brettcannon, @andybalaam
Files
  • add_more_error_values_to_test_errno.patch: Patch to add all the error values named in errnomodule.c to the "errors" variable in test_errno.py
  • 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 2008-03-18.16:26:27.457>
    created_at = <Date 2008-03-18.16:16:40.035>
    labels = ['type-bug', 'tests']
    title = 'test_errno fails with unexpected error value EREMOTEIO'
    updated_at = <Date 2008-03-18.16:35:59.175>
    user = 'https://github.com/andybalaam'

    bugs.python.org fields:

    activity = <Date 2008-03-18.16:35:59.175>
    actor = 'andybalaam'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-03-18.16:26:27.457>
    closer = 'brett.cannon'
    components = ['Tests']
    creation = <Date 2008-03-18.16:16:40.035>
    creator = 'andybalaam'
    dependencies = []
    files = ['9730']
    hgrepos = []
    issue_num = 2398
    keywords = ['patch']
    message_count = 4.0
    messages = ['63934', '63936', '63937', '63938']
    nosy_count = 2.0
    nosy_names = ['brett.cannon', 'andybalaam']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2398'
    versions = ['Python 3.0']

    @andybalaam
    Copy link
    Mannequin Author

    andybalaam mannequin commented Mar 18, 2008

    Running test_errno on my 32-bit Ubuntu Gutsy machine gives me this:

    $ ./python Lib/test/test_errno.py
    test_for_improper_attributes (__main__.ErrnoAttributeTests) ... FAIL
    test_using_errorcode (__main__.ErrnoAttributeTests) ... ok
    test_attributes_in_errorcode (__main__.ErrorcodeTests) ... ok

    ======================================================================
    FAIL: test_for_improper_attributes (main.ErrnoAttributeTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_errno.py", line 46, in test_for_improper_attributes
        "%s is an unexpected error value" % attribute)
    AssertionError: EREMOTEIO is an unexpected error value

    Ran 3 tests in 0.001s

    FAILED (failures=1)
    Traceback (most recent call last):
      File "Lib/test/test_errno.py", line 68, in <module>
        test_main()
      File "Lib/test/test_errno.py", line 64, in test_main
        test_support.run_unittest(ErrnoAttributeTests, ErrorcodeTests)
      File "/home/andy/cvs/python/Lib/test/test_support.py", line 573, in
    run_unittest
        _run_suite(suite)
      File "/home/andy/cvs/python/Lib/test/test_support.py", line 556, in
    _run_suite
        raise TestFailed(err)
    test.test_support.TestFailed: Traceback (most recent call last):
      File "Lib/test/test_errno.py", line 46, in test_for_improper_attributes
        "%s is an unexpected error value" % attribute)
    AssertionError: EREMOTEIO is an unexpected error value

    I've attached a patch which changes test_errno.py so that its list of
    expected errors exactly matches the possible errors listed in
    Modules/errnomodule.c in the latest SVN trunk.

    I don't know whether this is the right solution, but the patch is there
    if it is :)

    Apologies if I've misunderstood something, or formatted the patch wrong
    etc. This is my first Python patch.

    @andybalaam andybalaam mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 18, 2008
    @brettcannon
    Copy link
    Member

    Thanks for the patch, Andy, but I went ahead and fixed test_errno to
    only explicitly test errno values from Standard C. That way we are not
    constantly chasing our tail to support every errno value on every
    platform that Python runs on.

    @andybalaam
    Copy link
    Mannequin Author

    andybalaam mannequin commented Mar 18, 2008

    Adding Brett Cannon since it looks like his checkin created the test
    which fails on my machine. Apologies if this is very bad etiquette. I
    couldn't find any guidelines about this in the developers' docs, but
    probably that's because I am incompetent.

    @andybalaam
    Copy link
    Mannequin Author

    andybalaam mannequin commented Mar 18, 2008

    Woah! fast response, and what looks like a much more sensible fix.
    Thanks Brett.

    @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

    1 participant