Show More
@@ -1,4 +1,5 b'' | |||||
1 | import tempfile, os |
|
1 | import tempfile, os | |
|
2 | from pathlib import Path | |||
2 |
|
3 | |||
3 | from traitlets.config.loader import Config |
|
4 | from traitlets.config.loader import Config | |
4 |
|
5 | |||
@@ -43,7 +44,7 b' def test_store_restore():' | |||||
43 | assert ip.user_ns["foobaz"] == "80" |
|
44 | assert ip.user_ns["foobaz"] == "80" | |
44 |
|
45 | |||
45 | ip.magic("store -r") # restores _dh too |
|
46 | ip.magic("store -r") # restores _dh too | |
46 |
assert |
|
47 | assert any(Path(tmpd).samefile(p) for p in ip.user_ns["_dh"]) | |
47 |
|
48 | |||
48 | os.rmdir(tmpd) |
|
49 | os.rmdir(tmpd) | |
49 |
|
50 |
@@ -22,8 +22,8 b' def test_named_file_in_temporary_directory():' | |||||
22 |
|
22 | |||
23 | def test_temporary_working_directory(): |
|
23 | def test_temporary_working_directory(): | |
24 | with TemporaryWorkingDirectory() as directory: |
|
24 | with TemporaryWorkingDirectory() as directory: | |
25 | directory_path = Path(directory) |
|
25 | directory_path = Path(directory).resolve() | |
26 | assert directory_path.exists() |
|
26 | assert directory_path.exists() | |
27 |
assert Path.cwd() == directory_path |
|
27 | assert Path.cwd().resolve() == directory_path | |
28 | assert not directory_path.exists() |
|
28 | assert not directory_path.exists() | |
29 |
assert Path.cwd() != directory_path |
|
29 | assert Path.cwd().resolve() != directory_path |
General Comments 0
You need to be logged in to leave comments.
Login now