From 9232db36336b8041231af784ca041dbe38c232a0 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 25 Nov 2012 08:48:51 -0800 Subject: tests/test_quickstart.py: Accept `tmpdir` in the `cleandir` fixture so py.test manages the temp directory instead of the test code. --- tests/test_quickstart.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index eca0f78..63a48c2 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -5,9 +5,8 @@ import tox._quickstart @pytest.fixture() -def cleandir(): - newpath = tempfile.mkdtemp() - os.chdir(newpath) +def cleandir(tmpdir): + tmpdir.chdir() @pytest.mark.usefixtures("cleandir") -- cgit v1.2.1