Skip to content

Commit 5c7f43f

Browse files
committed
Avoid leaving any file after running tests
This notably prevents the file `.nx_file` from being created and not removed after running tests. That file could also lead to confusing test failures when changing and testing the code of python-dotenv.
1 parent 9d777e3 commit 5c7f43f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
@pytest.fixture
66
def cli():
7-
yield CliRunner()
7+
runner = CliRunner()
8+
with runner.isolated_filesystem():
9+
yield runner
810

911

1012
@pytest.fixture

0 commit comments

Comments
 (0)