Commit bc8cfc4c authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: Another unit test for tempdir

parent 0c937a12
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment