diff --git a/tests/test_scene.py b/tests/test_scene.py index a6f0f6e3..5bc6ce84 100644 --- a/tests/test_scene.py +++ b/tests/test_scene.py @@ -103,10 +103,11 @@ def test_scene_slice(): @pytest.mark.parametrize( "name, scale", [("test", 2), (None, None), (None, 1), ("test2", None)] ) -def test_scene_screenshot(name, scale): - s = Scene(screenshots_folder="tests/screenshots") +def test_scene_screenshot(name, scale, tmp_path): + d = tmp_path / "screenshots" + d.mkdir() + s = Scene(screenshots_folder=d) s.screenshot(name=name, scale=scale) - shutil.rmtree("tests/screenshots") del s