File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import tempfile , os
2+ from pathlib import Path
23
34from traitlets .config .loader import Config
45
@@ -43,7 +44,7 @@ def test_store_restore():
4344 assert ip .user_ns ["foobaz" ] == "80"
4445
4546 ip .magic ("store -r" ) # restores _dh too
46- assert os . path . realpath ( tmpd ) in ip .user_ns ["_dh" ]
47+ assert any ( Path ( tmpd ). samefile ( p ) for p in ip .user_ns ["_dh" ])
4748
4849 os .rmdir (tmpd )
4950
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ def test_named_file_in_temporary_directory():
2222
2323def test_temporary_working_directory ():
2424 with TemporaryWorkingDirectory () as directory :
25- directory_path = Path (directory )
25+ directory_path = Path (directory ). resolve ()
2626 assert directory_path .exists ()
27- assert Path .cwd () == directory_path . resolve ()
27+ assert Path .cwd (). resolve () == directory_path
2828 assert not directory_path .exists ()
29- assert Path .cwd () != directory_path . resolve ()
29+ assert Path .cwd (). resolve () != directory_path
You can’t perform that action at this time.
0 commit comments