Skip to content
Snippets Groups Projects
Commit bc8cfc4c authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: Another unit test for tempdir

parent 0c937a12
No related branches found
No related tags found
No related merge requests found
......@@ -51,3 +51,15 @@ def test_tempdir_changeto():
assert op.realpath(os.getcwd()) == cwd
assert op.realpath(os.getcwd()) == cwd
def test_tempdir_override():
with tempdir.tempdir() as parent:
# tempdir should not create/change to
# a new temp directory, but should
# stay in the override directory
with tempdir.tempdir(override=parent):
assert op.realpath(os.getcwd()) == op.realpath(parent)
# override should not be deleted
assert op.exists(parent)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment