We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c7ac337 + 6cd6139 commit 9924432Copy full SHA for 9924432
doc/en/fixture.rst
@@ -1035,15 +1035,19 @@ file:
1035
1036
# content of conftest.py
1037
1038
- import pytest
1039
- import tempfile
1040
import os
+ import shutil
+ import tempfile
1041
+
1042
+ import pytest
1043
1044
1045
@pytest.fixture()
1046
def cleandir():
1047
newpath = tempfile.mkdtemp()
1048
os.chdir(newpath)
1049
+ yield
1050
+ shutil.rmtree(newpath)
1051
1052
and declare its use in a test module via a ``usefixtures`` marker:
1053
0 commit comments