@@ -640,33 +640,33 @@ def test_layer_mode():
640640 assert set (zf .namelist ()) == namelist , zf .namelist ()
641641
642642
643- # def test_chmod():
644- # if os.name != "nt":
645- # # posix only
646- # # test --chmod
647- # _clean_paths(root=False)
648- # app_path = create_app(unzip="*", pip_args=["six"], lazy_install=True)
649- # subprocess.Popen([sys.executable, str(app_path), "--activate-zipapps"]).wait()
650- # temp = oct(app_path.stat().st_mode)[-3:]
651- # assert temp != "777", temp
652- # for _path in Path("zipapps_cache/app").rglob("*"):
653- # if _path.name == "six.py":
654- # temp = oct(_path.stat().st_mode)[-3:]
655- # assert temp != "777", temp
656- # break
657-
658- # _clean_paths(root=False)
659- # app_path = create_app(
660- # unzip="*", pip_args=["six"], lazy_install=True, chmod="777"
661- # )
662- # subprocess.Popen([sys.executable, str(app_path), "--activate-zipapps"]).wait()
663- # temp = oct(app_path.stat().st_mode)[-3:]
664- # assert temp == "777", temp
665- # for _path in Path("zipapps_cache/app").rglob("*"):
666- # if _path.name == "six.py":
667- # temp = oct(_path.stat().st_mode)[-3:]
668- # assert temp == "777", temp
669- # break
643+ def test_chmod ():
644+ if os .name != "nt" :
645+ # posix only
646+ # test --chmod
647+ _clean_paths (root = False )
648+ app_path = create_app (unzip = "*" , pip_args = ["six" ], lazy_install = True )
649+ subprocess .Popen ([sys .executable , str (app_path ), "--activate-zipapps" ]).wait ()
650+ temp = oct (app_path .stat ().st_mode )[- 3 :]
651+ assert temp != "777" , temp
652+ for _path in Path ("zipapps_cache/app" ).rglob ("*" ):
653+ if _path .name == "six.py" :
654+ temp = oct (_path .stat ().st_mode )[- 3 :]
655+ assert temp != "777" , temp
656+ break
657+
658+ _clean_paths (root = False )
659+ app_path = create_app (
660+ unzip = "*" , pip_args = ["six" ], lazy_install = True , chmod = "777"
661+ )
662+ subprocess .Popen ([sys .executable , str (app_path ), "--activate-zipapps" ]).wait ()
663+ temp = oct (app_path .stat ().st_mode )[- 3 :]
664+ assert temp == "777" , temp
665+ for _path in Path ("zipapps_cache/app" ).rglob ("*" ):
666+ if _path .name == "six.py" :
667+ temp = oct (_path .stat ().st_mode )[- 3 :]
668+ assert temp == "777" , temp
669+ break
670670
671671
672672def test_delete_useless ():
0 commit comments