From c1724de742c22cb1131b43096171820795b66182 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Mon, 30 Oct 2023 14:25:47 +0000 Subject: [PATCH] Added tmate action to debug on GitHub actions --- .github/workflows/test_and_deploy.yml | 3 +++ tests/test_scene.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 2268ebf9..eb7a770f 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -37,6 +37,9 @@ jobs: run: brew install hdf5 # Run tests + - uses: actions/checkout@v3 + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - uses: neuroinformatics-unit/actions/test@v2 with: python-version: ${{ matrix.python-version }} 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