@@ -40,9 +40,11 @@ def test_quiet_mode():
4040def test_freeze ():
4141 # test --freeze-reqs
4242 _clean_paths (root = False )
43- output = subprocess .check_output (
44- [sys .executable , "-m" , "zipapps" , "--freeze-reqs" , "-" , "six==1.16.0" ]
45- )
43+ output = subprocess .Popen (
44+ [sys .executable , "-m" , "zipapps" , "--freeze-reqs" , "-" , "six==1.16.0" ],
45+ stderr = subprocess .STDOUT ,
46+ stdout = subprocess .PIPE ,
47+ ).communicate ()[0 ]
4648 assert b"six==1.16.0" in output .strip (), output
4749
4850
@@ -405,6 +407,7 @@ def test_unzip_with_auto_unzip():
405407def test_env_usage ():
406408 # test ensure path for venv usage
407409 import importlib
410+
408411 _clean_paths (root = False )
409412 create_app (output = "bottle_env.pyz" , unzip = "bottle" , pip_args = ["bottle" ])
410413 # activate sys.path and unzip cache
@@ -644,21 +647,25 @@ def test_chmod():
644647 _clean_paths (root = False )
645648 app_path = create_app (unzip = "*" , pip_args = ["six" ], lazy_install = True )
646649 subprocess .Popen ([sys .executable , str (app_path ), "--activate-zipapps" ]).wait ()
647- assert Path ("app.pyz" ).stat ().st_mode != 33279
650+ temp = oct (app_path .stat ().st_mode )[- 3 :]
651+ assert temp != "777" , temp
648652 for _path in Path ("zipapps_cache/app" ).rglob ("*" ):
649653 if _path .name == "six.py" :
650- assert _path .stat ().st_mode != 33279 , _path .stat ().st_mode
654+ temp = oct (_path .stat ().st_mode )[- 3 :]
655+ assert temp != "777" , temp
651656 break
652657
653658 _clean_paths (root = False )
654659 app_path = create_app (
655660 unzip = "*" , pip_args = ["six" ], lazy_install = True , chmod = "777"
656661 )
657662 subprocess .Popen ([sys .executable , str (app_path ), "--activate-zipapps" ]).wait ()
658- assert Path ("app.pyz" ).stat ().st_mode == 33279
663+ temp = oct (app_path .stat ().st_mode )[- 3 :]
664+ assert temp == "777" , temp
659665 for _path in Path ("zipapps_cache/app" ).rglob ("*" ):
660666 if _path .name == "six.py" :
661- assert _path .stat ().st_mode == 33279 , _path .stat ().st_mode
667+ temp = oct (_path .stat ().st_mode )[- 3 :]
668+ assert temp == "777" , temp
662669 break
663670
664671
0 commit comments