Skip to content

Commit d5ba4fc

Browse files
Eclips4eryksun
andauthored
gh-120164: Fix test_os.test_win32_mkdir_700() (#120177)
Don't compare the path to avoid encoding issues. Co-authored-by: Eryk Sun <[email protected]>
1 parent 47816f4 commit d5ba4fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_os.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,9 +1837,10 @@ def test_win32_mkdir_700(self):
18371837
os.mkdir(path, mode=0o700)
18381838
out = subprocess.check_output(["cacls.exe", path, "/s"], encoding="oem")
18391839
os.rmdir(path)
1840+
out = out.strip().rsplit(" ", 1)[1]
18401841
self.assertEqual(
1841-
out.strip(),
1842-
f'{path} "D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"',
1842+
out,
1843+
'"D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"',
18431844
)
18441845

18451846
def tearDown(self):

0 commit comments

Comments
 (0)