Skip to content

Commit

Permalink
Refactored test_scene_screenshot to use the tmp_path fixture to fix p…
Browse files Browse the repository at this point in the history
…ermission issues for Windows
  • Loading branch information
IgorTatarnikov committed Oct 30, 2023
1 parent f638888 commit e585e15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit e585e15

Please sign in to comment.