File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
source_py2/test_python_toolbox/test_zip_tools Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,23 @@ def test():
2424 (folder_to_zip / 'some_other_file.txt' ).open ('w' ).write (
2525 u'hello there again!' )
2626
27+ import gc ; gc .collect ()
28+
2729 zip_file_path = temp_folder / 'archive.zip'
2830 assert isinstance (zip_file_path , pathlib .Path )
2931 zip_tools .zip_folder (folder_to_zip , temp_folder / 'archive.zip' )
3032
31- assert zip_file_path .is_file ()
32- assert set (
33+ result = set (
3334 zip_tools .unzip_in_memory (zip_file_path .open ('rb' ).read ())
34- ) == {
35+ )
36+
37+ assert zip_file_path .is_file ()
38+
39+ # Got two options here because of PyPy shenanigans:
40+ assert result == {
3541 ('folder_to_zip/some_file.txt' , b'hello there!' ),
3642 ('folder_to_zip/some_other_file.txt' , b'hello there again!' ),
43+ } or result == {
44+ ('folder_to_zip/some_file.txt' , 'hello there!' ),
45+ ('folder_to_zip/some_other_file.txt' , 'hello there again!' ),
3746 }
You can’t perform that action at this time.
0 commit comments