STINNER Victor <vstin...@redhat.com> added the comment:
Another weirdness of test_urllib.py: it redefines urlopen() and actually tests its test function, rather than testing the urllib.request module. https://github.com/python/cpython/pull/14529#issuecomment-507646868 "def urlopen(url, data=None, proxies=None):" in test_urllib.py is as old as the urllib module itself! commit 1afc1696167547a5fa101c53e5a3ab4717f8852c Author: Jeremy Hylton <jer...@alum.mit.edu> Date: Wed Jun 18 20:49:58 2008 +0000 Make a new urllib package . It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran. At least, the test function should have a different name, no? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37475> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com