Skip to content

Commit 3730f60

Browse files
miss-islingtonEclips4eryksun
authored
[3.12] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120203)
gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) Don't compare the path to avoid encoding issues. (cherry picked from commit d5ba4fc) Co-authored-by: Kirill Podoprigora <[email protected]> Co-authored-by: Eryk Sun <[email protected]>
1 parent 92a38e9 commit 3730f60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_os.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1823,9 +1823,10 @@ def test_win32_mkdir_700(self):
18231823
os.mkdir(path, mode=0o700)
18241824
out = subprocess.check_output(["cacls.exe", path, "/s"], encoding="oem")
18251825
os.rmdir(path)
1826+
out = out.strip().rsplit(" ", 1)[1]
18261827
self.assertEqual(
1827-
out.strip(),
1828-
f'{path} "D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"',
1828+
out,
1829+
'"D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;OW)"',
18291830
)
18301831

18311832
def tearDown(self):

0 commit comments

Comments
 (0)