From e075e6c9df8796ca53e059416a08c882fd645671 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 11 Sep 2015 20:52:24 +0200 Subject: [PATCH] Clean up correctly after standarddir tests. --- tests/unit/utils/test_standarddir.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index 1302034e1..7bb0991b1 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -52,9 +52,12 @@ def no_cachedir_tag(monkeypatch): lambda: None) -@pytest.fixture(autouse=True) +@pytest.yield_fixture(autouse=True) @pytest.mark.usefixtures('no_cachedir_tag') def reset_standarddir(): + """Clean up standarddir arguments before and after each test.""" + standarddir.init(None) + yield standarddir.init(None)