Skip to content

Commit

Permalink
pythongh-120164: Fix test_os.test_win32_mkdir_700() (pythonGH-120177)
Browse files Browse the repository at this point in the history
Don't compare the path to avoid encoding issues.

(cherry picked from commit d5ba4fc)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
  • Loading branch information
2 people authored and miss-islington committed Jun 7, 2024
1 parent 0e6605f commit b7d395f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b7d395f

Please sign in to comment.