bpo-34711: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory by aixtools · Pull Request #9687 · python/cpython (original) (raw)
On 10/26/2018 4:51 PM, Tal Einat wrote: Which test(s) currently fail(s) on AIX? Can you perhaps supply a link to such failures on a buildbot?
This is also available on the bots, but rather than having to search in 5000 to 20000 lines of text, here is the issue: test_all (test.test_httpservers.MiscTestCase) ... ok ====================================================================== FAIL: test_get (test.test_httpservers.SimpleHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_httpservers.py", line 422, in test_get self.check_status_and_reason(response, HTTPStatus.NOT_FOUND) File "/data/prj/python/git/python3-3.8/Lib/test/test_httpservers.py", line 374, in check_status_and_reason self.assertEqual(response.status, status) AssertionError: 200 != <HTTPStatus.NOT_FOUND: 404> ====================================================================== FAIL: test_path_without_leading_slash (test.test_httpservers.SimpleHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_httpservers.py", line 523, in test_path_without_leading_slash self.check_status_and_reason(response, HTTPStatus.NOT_FOUND) File "/data/prj/python/git/python3-3.8/Lib/test/test_httpservers.py", line 374, in check_status_and_reason self.assertEqual(response.status, status) AssertionError: 200 != <HTTPStatus.NOT_FOUND: 404>
---------------------------------------------------------------------- Ran 64 tests in 1.779s FAILED (failures=2, skipped=13) /data/prj/python/git/python3-3.8/Lib/test/support/__init__.py:1572: ResourceWarning: unclosed <socket.socket [closed] fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6> gc.collect() test test_httpservers failed test_httpservers failed == Tests result: FAILURE == 1 test failed: test_httpservers Total duration: 2 sec 35 ms Tests result: FAILURE AIX is not the only platform that will open a file with a trailing slash. FYI: this is the third solution, as the others were rejected - see PR9360 and PR9675.
Is there a test case for the similar issue with junctions on Windows? I assume not since this would be failing on our Windows CI builds. If this fixes that too, it could be good to add such a test. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.