test_urllib and test_socket fail on Win2K today. test_socket (I think Guido already knows about these): ====================================================================== ERROR: testIPv4toString (__main__.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_socket.py", line 322, in testIPv4toString from socket import inet_aton as f, inet_pton, AF_INET ImportError: cannot import name inet_pton ====================================================================== ERROR: testStringToIPv4 (__main__.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_socket.py", line 352, in testStringToIPv4 from socket import inet_ntoa as f, inet_ntop, AF_INET ImportError: cannot import name inet_ntop ---------------------------------------------------------------------- Ran 46 tests in 3.555s FAILED (errors=2) test_urllib (these may all be bad line-end assumptions): ====================================================================== FAIL: test_fileno (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 68, in test_fileno "Reading on the file descriptor returned by fileno() " File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: Reading on the file descriptor returned by fileno() did not return the expected text ====================================================================== FAIL: test_iter (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 88, in test_iter self.assertEqual(line, self.text) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\r\n' != 'test_urllib: urlopen_FileTests\n' ====================================================================== FAIL: test_read (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 48, in test_read self.assertEqual(self.text, self.returned_obj.read()) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\n' != 'test_urllib: urlopen_FileTests\r\n' ====================================================================== FAIL: test_readline (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 51, in test_readline self.assertEqual(self.text, self.returned_obj.readline()) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\n' != 'test_urllib: urlopen_FileTests\r\n' ====================================================================== FAIL: test_readlines (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 61, in test_readlines "readlines() returned improper text") File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: readlines() returned improper text ---------------------------------------------------------------------- Ran 23 tests in 0.280s FAILED (failures=5)
[Tim Peters]
test_urllib (these may all be bad line-end assumptions):
Yep, it looks like it is line-ending issues. Is this still happening even after Guido changed the test to open the files in binary? If it is I will change the tests after Guido give the all clear for CVS checkins again and strip all text before comparing.
====================================================================== FAIL: test_fileno (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 68, in test_fileno "Reading on the file descriptor returned by fileno() " File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: Reading on the file descriptor returned by fileno() did not return the expected text
====================================================================== FAIL: test_iter (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 88, in test_iter self.assertEqual(line, self.text) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\r\n' != 'test_urllib: urlopen_FileTests\n'
====================================================================== FAIL: test_read (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 48, in test_read self.assertEqual(self.text, self.returned_obj.read()) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\n' != 'test_urllib: urlopen_FileTests\r\n'
====================================================================== FAIL: test_readline (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 51, in test_readline self.assertEqual(self.text, self.returned_obj.readline()) File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 'test_urllib: urlopen_FileTests\n' != 'test_urllib: urlopen_FileTests\r\n'
====================================================================== FAIL: test_readlines (__main__.urlopen_FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "../lib/test/test_urllib.py", line 61, in test_readlines "readlines() returned improper text") File "C:\Code\python\lib\unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: readlines() returned improper text
---------------------------------------------------------------------- Ran 23 tests in 0.280s
FAILED (failures=5)
test_urllib (these may all be bad line-end assumptions):
[Brett]
Yep, it looks like it is line-ending issues. Is this still happening even after Guido changed the test to open the files in binary?
No, all is well now. That's why you didn't see a sequence of increasingly vicious msgs from me <wink>.
[Tim Peters]
test_urllib (these may all be bad line-end assumptions):
[Brett]
Yep, it looks like it is line-ending issues. Is this still happening even after Guido changed the test to open the files in binary?
No, all is well now. That's why you didn't see a sequence of increasingly vicious msgs from me <wink>.
=) I have fixed my copy, though, to rstrip all the text that is compared in case Guido's quick fix is removed later. I will commit it when Guido gives the all-clear. -Brett
=) I have fixed my copy, though, to rstrip all the text that is compared in case Guido's quick fix is removed later. I will commit it when Guido gives the all-clear.
I just realized that this would be *wrong* -- URLs may point to binary files and there's no reliable way to know whether this is the case. --Guido van Rossum (home page: http://www.python.org/~guido/)
[Guido van Rossum]
=) I have fixed my copy, though, to rstrip all the text that is compared in case Guido's quick fix is removed later. I will commit it when Guido gives the all-clear.
I just realized that this would be *wrong* -- URLs may point to binary files and there's no reliable way to know whether this is the case.
OK, so then I won't commit my changes and let the stand as they are in CVS right now. -Brett
participants (3)
-
Brett Cannon
-
Guido van Rossum
-
Tim Peters