@@ -3296,39 +3296,6 @@ def test_malformed_paths(self):
32963296 assert list (map (str , root .iterdir ())) == ['../' ]
32973297 assert root .joinpath ('..' ).joinpath ('parent.txt' ).read_bytes () == b'content'
32983298
3299- def test_unsupported_names (self ):
3300- """
3301- Path segments with special characters are readable.
3302-
3303- On some platforms or file systems, characters like
3304- ``:`` and ``?`` are not allowed, but they are valid
3305- in the zip file.
3306- """
3307- data = io .BytesIO ()
3308- zf = zipfile .ZipFile (data , "w" )
3309- zf .writestr ("path?" , b"content" )
3310- zf .writestr ("V: NMS.flac" , b"fLaC..." )
3311- zf .filename = ''
3312- root = zipfile .Path (zf )
3313- contents = root .iterdir ()
3314- assert next (contents ).name == 'path?'
3315- item = next (contents )
3316- assert item .name == 'V: NMS.flac' , item .name
3317- assert root .joinpath ('V: NMS.flac' ).read_bytes () == b"fLaC..."
3318-
3319- def test_backslash_not_separator (self ):
3320- """
3321- In a zip file, backslashes are not separators.
3322- """
3323- data = io .BytesIO ()
3324- zf = zipfile .ZipFile (data , "w" )
3325- zf .writestr (DirtyZipInfo .for_name ("foo\\ bar" , zf ), b"content" )
3326- zf .filename = ''
3327- root = zipfile .Path (zf )
3328- (first ,) = root .iterdir ()
3329- assert not first .is_dir ()
3330- assert first .name == 'foo\\ bar' , first .name
3331-
33323299
33333300class DirtyZipInfo (zipfile .ZipInfo ):
33343301 """
0 commit comments