@@ -929,37 +929,35 @@ def test_strip_protocol_no_authority(uri, expected, cwd, current_drive):
929929
930930@pytest .mark .parametrize (
931931 "uri, expected" ,
932- (
933- [
934- ("file:/path" , "/path" ),
935- ("file:///path" , "/path" ),
936- ("file:////path" , "//path" ),
937- ("local:/path" , "/path" ),
938- ("s3://bucket/key" , "{cwd}/s3://bucket/key" ),
939- ("/path" , "/path" ),
940- ("file:///" , "/" ),
941- ]
942- if not WIN
943- else [
944- ("file:c:/path" , "c:/path" ),
945- ("file:/c:/path" , "c:/path" ),
946- ("file:/C:/path" , "C:/path" ),
947- ("file://c:/path" , "c:/path" ),
948- ("file:///c:/path" , "c:/path" ),
949- ("local:/path" , "{current_drive}/path" ),
950- ("s3://bucket/key" , "{cwd}/s3://bucket/key" ),
951- ("c:/path" , "c:/path" ),
952- ("c:\\ path" , "c:/path" ),
953- ("file:///" , "{current_drive}/" ),
954- pytest .param (
955- "file://localhost/c:/path" ,
956- "c:/path" ,
957- marks = pytest .mark .xfail (
958- reason = "rfc8089 section3 'localhost uri' not supported"
959- ),
932+ [
933+ ("file:/path" , "/path" ),
934+ ("file:///path" , "/path" ),
935+ ("file:////path" , "//path" ),
936+ ("local:/path" , "/path" ),
937+ ("s3://bucket/key" , "{cwd}/s3://bucket/key" ),
938+ ("/path" , "/path" ),
939+ ("file:///" , "/" ),
940+ ]
941+ if not WIN
942+ else [
943+ ("file:c:/path" , "c:/path" ),
944+ ("file:/c:/path" , "c:/path" ),
945+ ("file:/C:/path" , "C:/path" ),
946+ ("file://c:/path" , "c:/path" ),
947+ ("file:///c:/path" , "c:/path" ),
948+ ("local:/path" , "{current_drive}/path" ),
949+ ("s3://bucket/key" , "{cwd}/s3://bucket/key" ),
950+ ("c:/path" , "c:/path" ),
951+ ("c:\\ path" , "c:/path" ),
952+ ("file:///" , "{current_drive}/" ),
953+ pytest .param (
954+ "file://localhost/c:/path" ,
955+ "c:/path" ,
956+ marks = pytest .mark .xfail (
957+ reason = "rfc8089 section3 'localhost uri' not supported"
960958 ),
961- ]
962- ) ,
959+ ),
960+ ] ,
963961)
964962def test_strip_protocol_absolute_paths (uri , expected , current_drive , cwd ):
965963 expected = expected .format (current_drive = current_drive , cwd = cwd )
0 commit comments