diff --git a/scilpy/io/fetcher.py b/scilpy/io/fetcher.py index 6876d6e6e..945a1e2fb 100644 --- a/scilpy/io/fetcher.py +++ b/scilpy/io/fetcher.py @@ -5,9 +5,8 @@ import logging import os import pathlib -import zipfile - import requests +import zipfile from scilpy import SCILPY_HOME diff --git a/scilpy/viz/backends/fury.py b/scilpy/viz/backends/fury.py index 3940dacfb..ab930cb6d 100644 --- a/scilpy/viz/backends/fury.py +++ b/scilpy/viz/backends/fury.py @@ -148,7 +148,7 @@ def set_viewport(scene, orientation, slice_index, volume_shape, aspect_ratio): Ratio between viewport's width and height. """ - scene.projection('parallel') + scene.projection(proj_type='parallel') camera = initialize_camera( orientation, slice_index, volume_shape, aspect_ratio) scene.set_camera(position=camera[CamParams.VIEW_POS], diff --git a/scripts/tests/test_viz_volume_screenshot.py b/scripts/tests/test_viz_volume_screenshot.py index 1e4db3509..12cb79aab 100644 --- a/scripts/tests/test_viz_volume_screenshot.py +++ b/scripts/tests/test_viz_volume_screenshot.py @@ -12,7 +12,8 @@ tmp_dir = tempfile.TemporaryDirectory() -def test_screenshot(script_runner): +def test_screenshot(script_runner, monkeypatch): + monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) in_fa = os.path.join(SCILPY_HOME, 'bst', 'fa.nii.gz') ret = script_runner.run("scil_viz_volume_screenshot.py", in_fa, 'fa.png')