##// END OF EJS Templates
On Windows `Path.cwd()` might be in short filename/SFN format
Nikita Kniazev -
Show More
@@ -1,4 +1,5 b''
1 1 import tempfile, os
2 from pathlib import Path
2 3
3 4 from traitlets.config.loader import Config
4 5
@@ -43,7 +44,7 b' def test_store_restore():'
43 44 assert ip.user_ns["foobaz"] == "80"
44 45
45 46 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"])
47 48
48 49 os.rmdir(tmpd)
49 50
@@ -22,8 +22,8 b' def test_named_file_in_temporary_directory():'
22 22
23 23 def test_temporary_working_directory():
24 24 with TemporaryWorkingDirectory() as directory:
25 directory_path = Path(directory)
25 directory_path = Path(directory).resolve()
26 26 assert directory_path.exists()
27 assert Path.cwd() == directory_path.resolve()
27 assert Path.cwd().resolve() == directory_path
28 28 assert not directory_path.exists()
29 assert Path.cwd() != directory_path.resolve()
29 assert Path.cwd().resolve() != directory_path
General Comments 0
You need to be logged in to leave comments. Login now