Skip to content

Commit a361130

Browse files
committed
review suggestion
use `os.path.samefile` rather than comparing `os.stat` directly.
1 parent 1e9be73 commit a361130

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/test_before_build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Works around path-comparison bugs caused by short-paths on Windows e.g.
2929
# vssadm~1 instead of vssadministrator
3030
31-
assert os.stat(stored_prefix) == os.stat(sys.prefix)
31+
assert os.path.samefile(stored_prefix, sys.prefix)
3232
"""
3333
)
3434
)

test/test_before_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_prefix(self):
3030
# Works around path-comparison bugs caused by short-paths on Windows e.g.
3131
# vssadm~1 instead of vssadministrator
3232
33-
assert os.stat(stored_prefix) == os.stat(sys.prefix)
33+
assert os.path.samefile(stored_prefix, sys.prefix)
3434
"""
3535

3636

0 commit comments

Comments
 (0)