@@ -1496,21 +1496,14 @@ def test_exist_ok_existing_regular_file(self):
14961496 @unittest .skipUnless (os .name == 'nt' , "requires Windows" )
14971497 def test_win32_mkdir_700 (self ):
14981498 base = support .TESTFN
1499- path1 = os .path .join (support .TESTFN , 'dir1' )
1500- path2 = os .path .join (support .TESTFN , 'dir2' )
1501- # mode=0o700 is special-cased to override ACLs on Windows
1502- # There's no way to know exactly how the ACLs will look, so we'll
1503- # check that they are different from a regularly created directory.
1504- os .mkdir (path1 , mode = 0o700 )
1505- os .mkdir (path2 , mode = 0o777 )
1506-
1507- out1 = subprocess .check_output (["icacls.exe" , path1 ], encoding = "oem" )
1508- out2 = subprocess .check_output (["icacls.exe" , path2 ], encoding = "oem" )
1509- os .rmdir (path1 )
1510- os .rmdir (path2 )
1511- out1 = out1 .replace (path1 , "<PATH>" )
1512- out2 = out2 .replace (path2 , "<PATH>" )
1513- self .assertNotEqual (out1 , out2 )
1499+ path = os .path .abspath (os .path .join (support .TESTFN , 'dir' ))
1500+ os .mkdir (path , mode = 0o700 )
1501+ out = subprocess .check_output (["cacls.exe" , path , "/s" ], encoding = "oem" )
1502+ os .rmdir (path )
1503+ self .assertEqual (
1504+ out .strip (),
1505+ f'{ path } "D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"' ,
1506+ )
15141507
15151508 def tearDown (self ):
15161509 path = os .path .join (support .TESTFN , 'dir1' , 'dir2' , 'dir3' ,
0 commit comments