diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index de5a86f676c4d5..2beb9ca8aa6ccb 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1837,9 +1837,10 @@ def test_win32_mkdir_700(self): os.mkdir(path, mode=0o700) out = subprocess.check_output(["cacls.exe", path, "/s"], encoding="oem") os.rmdir(path) + out = out.strip().rsplit(" ", 1)[1] self.assertEqual( - out.strip(), - f'{path} "D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"', + out, + '"D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"', ) def tearDown(self):