Skip to content

Commit c1019a3

Browse files
committed
nukes output folder that was specified, defaults to 'fixtures'
1 parent acf1bd8 commit c1019a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pytest_plugins/filler/filler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,10 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: int):
12121212
# * no tests were filled
12131213
html_output_is_enabled = getattr(session.config.option, "htmlpath", None)
12141214
if not html_output_is_enabled:
1215-
shutil.rmtree("fixtures")
1215+
# determine chosen fixtures output folder
1216+
fixture_output_obj: FixtureOutput = FixtureOutput.from_config(session.config)
1217+
fixture_output_folder: Path = fixture_output_obj.output_path
1218+
shutil.rmtree(fixture_output_folder)
12161219

12171220
# Create tarball of the output directory if the output is a tarball.
12181221
fixture_output.create_tarball()

0 commit comments

Comments
 (0)