@@ -994,7 +994,6 @@ def test_url_collapse_path(self):
994994 msg = 'path = %r\n Got: %r\n Wanted: %r' %
995995 (path , actual , expected ))
996996
997- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: Tuples differ: (b"", None, 200) != (b"Hello World\n ", "text/html", <HTTPStatus.OK: 200>)' )
998997 def test_headers_and_content (self ):
999998 res = self .request ('/cgi-bin/file1.py' )
1000999 self .assertEqual (
@@ -1005,7 +1004,6 @@ def test_issue19435(self):
10051004 res = self .request ('///////////nocgi.py/../cgi-bin/nothere.sh' )
10061005 self .assertEqual (res .status , HTTPStatus .NOT_FOUND )
10071006
1008- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; b"" != b"1, python, 123456\n "' )
10091007 def test_post (self ):
10101008 params = urllib .parse .urlencode (
10111009 {'spam' : 1 , 'eggs' : 'python' , 'bacon' : 123456 })
@@ -1014,7 +1012,6 @@ def test_post(self):
10141012
10151013 self .assertEqual (res .read (), b'1, python, 123456' + self .linesep )
10161014
1017- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: b"" != b"32768 32768\n "' )
10181015 def test_large_content_length (self ):
10191016 for w in range (15 , 25 ):
10201017 size = 1 << w
@@ -1023,7 +1020,8 @@ def test_large_content_length(self):
10231020 res = self .request ('/cgi-bin/file7.py' , 'POST' , body , headers )
10241021 self .assertEqual (res .read (), b'%d %d' % (size , size ) + self .linesep )
10251022
1026- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: b"" != b"Hello World\n "' )
1023+ # TODO: RUSTPYTHON: times out on macOS CI
1024+ @unittest .expectedFailureIf (sys .platform == 'darwin' , 'TODO: RUSTPYTHON; times out on macOS' )
10271025 def test_large_content_length_truncated (self ):
10281026 with support .swap_attr (self .request_handler , 'timeout' , 0.001 ):
10291027 for w in range (18 , 65 ):
@@ -1037,7 +1035,6 @@ def test_invaliduri(self):
10371035 res .read ()
10381036 self .assertEqual (res .status , HTTPStatus .NOT_FOUND )
10391037
1040- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: Tuples differ: (b"Hello World\n ", "text/html", <HTTPStatus.OK: 200>) != (b"", None, 200)' )
10411038 def test_authorization (self ):
10421039 headers = {b'Authorization' : b'Basic ' +
10431040 base64 .b64encode (b'username:pass' )}
@@ -1046,15 +1043,13 @@ def test_authorization(self):
10461043 (b'Hello World' + self .linesep , 'text/html' , HTTPStatus .OK ),
10471044 (res .read (), res .getheader ('Content-type' ), res .status ))
10481045
1049- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: Tuples differ: (b"Hello World\n ", "text/html", <HTTPStatus.OK: 200>) != (b"", None, 200)' )
10501046 def test_no_leading_slash (self ):
10511047 # http://bugs.python.org/issue2254
10521048 res = self .request ('cgi-bin/file1.py' )
10531049 self .assertEqual (
10541050 (b'Hello World' + self .linesep , 'text/html' , HTTPStatus .OK ),
10551051 (res .read (), res .getheader ('Content-type' ), res .status ))
10561052
1057- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; ValueError: signal only works in main thread' )
10581053 def test_os_environ_is_not_altered (self ):
10591054 signature = "Test CGI Server"
10601055 os .environ ['SERVER_SOFTWARE' ] = signature
@@ -1064,36 +1059,31 @@ def test_os_environ_is_not_altered(self):
10641059 (res .read (), res .getheader ('Content-type' ), res .status ))
10651060 self .assertEqual (os .environ ['SERVER_SOFTWARE' ], signature )
10661061
1067- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; ValueError: signal only works in main thread' )
10681062 def test_urlquote_decoding_in_cgi_check (self ):
10691063 res = self .request ('/cgi-bin%2ffile1.py' )
10701064 self .assertEqual (
10711065 (b'Hello World' + self .linesep , 'text/html' , HTTPStatus .OK ),
10721066 (res .read (), res .getheader ('Content-type' ), res .status ))
10731067
1074- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: Tuples differ: (b"Hello World\n ", "text/html", <HTTPStatus.OK: 200>) != (b"", None, 200)' )
10751068 def test_nested_cgi_path_issue21323 (self ):
10761069 res = self .request ('/cgi-bin/child-dir/file3.py' )
10771070 self .assertEqual (
10781071 (b'Hello World' + self .linesep , 'text/html' , HTTPStatus .OK ),
10791072 (res .read (), res .getheader ('Content-type' ), res .status ))
10801073
1081- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; ValueError: signal only works in main thread' )
10821074 def test_query_with_multiple_question_mark (self ):
10831075 res = self .request ('/cgi-bin/file4.py?a=b?c=d' )
10841076 self .assertEqual (
10851077 (b'a=b?c=d' + self .linesep , 'text/html' , HTTPStatus .OK ),
10861078 (res .read (), res .getheader ('Content-type' ), res .status ))
10871079
1088- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: Tuples differ: (b"k=aa%2F%2Fbb&//q//p//=//a//b//\n ", "text/html", <HTTPStatus.OK: 200>) != (b"", None, 200)' )
10891080 def test_query_with_continuous_slashes (self ):
10901081 res = self .request ('/cgi-bin/file4.py?k=aa%2F%2Fbb&//q//p//=//a//b//' )
10911082 self .assertEqual (
10921083 (b'k=aa%2F%2Fbb&//q//p//=//a//b//' + self .linesep ,
10931084 'text/html' , HTTPStatus .OK ),
10941085 (res .read (), res .getheader ('Content-type' ), res .status ))
10951086
1096- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; Tuples differ: (b"", None, 200) != (b"Hello World\n ", "text/html", <HTTPStatus.OK: 200>)' )
10971087 def test_cgi_path_in_sub_directories (self ):
10981088 try :
10991089 CGIHTTPRequestHandler .cgi_directories .append ('/sub/dir/cgi-bin' )
@@ -1104,7 +1094,6 @@ def test_cgi_path_in_sub_directories(self):
11041094 finally :
11051095 CGIHTTPRequestHandler .cgi_directories .remove ('/sub/dir/cgi-bin' )
11061096
1107- @unittest .expectedFailureIf (sys .platform != 'win32' , 'TODO: RUSTPYTHON; AssertionError: b"HTTP_ACCEPT=text/html,text/plain" not found in b""' )
11081097 def test_accept (self ):
11091098 browser_accept = \
11101099 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
0 commit comments