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_urllib2net fails #61362

Closed
ddventoucaredu mannequin opened this issue Feb 8, 2013 · 10 comments
Closed

test_urllib2net fails #61362

ddventoucaredu mannequin opened this issue Feb 8, 2013 · 10 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@ddventoucaredu
Copy link
Mannequin

ddventoucaredu mannequin commented Feb 8, 2013

BPO 17160
Nosy @ned-deily, @ezio-melotti, @bitdancer, @zware
Superseder
  • bpo-16969: test_urlwithfrag fail
  • 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 2014-04-23.03:32:17.914>
    created_at = <Date 2013-02-08.16:45:53.995>
    labels = ['type-bug', 'tests']
    title = 'test_urllib2net fails'
    updated_at = <Date 2014-04-23.16:15:03.986>
    user = 'https://bugs.python.org/ddventoucaredu'

    bugs.python.org fields:

    activity = <Date 2014-04-23.16:15:03.986>
    actor = 'ddvento@ucar.edu'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-04-23.03:32:17.914>
    closer = 'zach.ware'
    components = ['Tests']
    creation = <Date 2013-02-08.16:45:53.995>
    creator = 'ddvento@ucar.edu'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 17160
    keywords = []
    message_count = 10.0
    messages = ['181682', '181683', '181685', '181686', '181691', '182096', '216369', '217051', '217052', '217075']
    nosy_count = 5.0
    nosy_names = ['ned.deily', 'ezio.melotti', 'r.david.murray', 'zach.ware', 'ddvento@ucar.edu']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '16969'
    type = 'behavior'
    url = 'https://bugs.python.org/issue17160'
    versions = ['Python 2.7']

    @ddventoucaredu
    Copy link
    Mannequin Author

    ddventoucaredu mannequin commented Feb 8, 2013

    test_urllib2net fails as follows. Looking at test_urllib2net.py" line 165 does not reveal anything interesting to me

    ./python Lib/test/regrtest.py -uall -v test_urllib2net
    == CPython 2.7.3 (default, Feb 8 2013, 08:28:21) [GCC 4.7.2]
    == Linux-2.6.32-220.13.1.el6.x86_64-x86_64-with-redhat-6.2-Santiago little-endian
    == /glade/scratch/ddvento/build/Python-2.7.3-westmere/build/test_python_7544
    Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
    test_urllib2net
    test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... ok
    test_file (test.test_urllib2net.OtherNetworkTests) ... ok
    test_fileno (test.test_urllib2net.OtherNetworkTests) ... ok
    test_ftp (test.test_urllib2net.OtherNetworkTests) ... ok
    test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... ok
    test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... FAIL
    test_close (test.test_urllib2net.CloseSocketTest) ... ok
    test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ok
    test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
    test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
    test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ok
    test_http_basic (test.test_urllib2net.TimeoutTest) ... ok
    test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
    test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
    test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok

    ======================================================================
    FAIL: test_urlwithfrag (test.test_urllib2net.OtherNetworkTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/glade/scratch/ddvento/build/Python-2.7.3-westmere/Lib/test/test_urllib2net.py", line 165, in test_urlwithfrag
        "http://docs.python.org/glossary.html#glossary")
    AssertionError: 'http://docs.python.org/2/glossary.html' != 'http://docs.python.org/glossary.html#glossary'

    Ran 15 tests in 14.684s

    FAILED (failures=1)
    test test_urllib2net failed -- Traceback (most recent call last):
      File "/glade/scratch/ddvento/build/Python-2.7.3-westmere/Lib/test/test_urllib2net.py", line 165, in test_urlwithfrag
        "http://docs.python.org/glossary.html#glossary")
    AssertionError: 'http://docs.python.org/2/glossary.html' != 'http://docs.python.org/glossary.html#glossary'

    1 test failed:
    test_urllib2net

    @ddventoucaredu ddventoucaredu mannequin added the tests Tests in the Lib/test dir label Feb 8, 2013
    @bitdancer
    Copy link
    Member

    It passes on all our buildbots, and for me locally. Is it possible there is a proxy server between you and python.org that is changing the url returned?

    @ddventoucaredu
    Copy link
    Mannequin Author

    ddventoucaredu mannequin commented Feb 8, 2013

    Yes, it is possible, do you want me to investigate more with my network
    people?

    @bitdancer
    Copy link
    Member

    I think only if you want to. As far as we are concerned the test is correct and passing. (And this kind of thing is the reason that that test set is only run when -uall is specified.)

    I'm going to close the issue. If you do investigate, and feel that you've found a real bug, please reopen it.

    @ned-deily
    Copy link
    Member

    The test is failing because of a restructuring of the docs.python.org website. The test was changed on 2012-10-28 to use the new URL (923ca6d73bad and friends). That change will be in the next set of maintenance releases including 2.7.4 real soon now.

    @ezio-melotti
    Copy link
    Member

    See also bpo-16969.

    @ezio-melotti ezio-melotti added the type-bug An unexpected behavior, bug, or error label Feb 14, 2013
    @ddventoucaredu
    Copy link
    Mannequin Author

    ddventoucaredu mannequin commented Apr 15, 2014

    Reopening, since this is still broken in Python 2.7.6

    I wonder why do we have to use real websites instead of mocks for this test. And if there are really really really really good reasons, if we can use example.com instead as in issue bpo-20939 (maybe that is more stable than python.org)

    @ddventoucaredu ddventoucaredu mannequin reopened this Apr 15, 2014
    @zware
    Copy link
    Member

    zware commented Apr 23, 2014

    This was already fixed, just not before 2.7.6 was released.

    @zware zware closed this as completed Apr 23, 2014
    @zware
    Copy link
    Member

    zware commented Apr 23, 2014

    Actually, that's not quite right. It was fixed in 2.7.6, then changes to the website broke it again and it has been fixed again since then. Either way, it ain't broke right now ;)

    @ddventoucaredu
    Copy link
    Mannequin Author

    ddventoucaredu mannequin commented Apr 23, 2014

    Well, ok, thanks :-)

    But I'm still wondering if it's not possible to use mocks for this test.
    or at least example.com (as in issue bpo-20939) which is supposed to be
    more stable than python.org

    @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

    4 participants