Skip to content

Commit 1fba5a6

Browse files
authored
Merge pull request #301 from melonora/fix_test
Fix read_generic_wrapper test and add schedule for uploading artefacts to prevent expiration issue.
2 parents 28c6061 + 386b634 commit 1fba5a6

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.github/workflows/prepare_test_data.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Prepare test data
22

33
on:
4+
schedule:
5+
- cron: "0 0 1 * *" # run once a month to prevent artifact expiration
46
workflow_dispatch:
57
# uncomment and adjust the branch name if you need to add new datasets to the artifact
68
# push:

.github/workflows/test.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,12 @@ jobs:
5353
5454
- name: Download artifact of test data
5555
if: matrix.python == '3.12'
56-
uses: dawidd6/action-download-artifact@v2
56+
uses: dawidd6/action-download-artifact@v9
5757
with:
5858
workflow: prepare_test_data.yaml
5959
name: data
6060
path: ./data
6161

62-
- name: List the data directory
63-
if: matrix.python == '3.12'
64-
run: |
65-
ls -l ./data
66-
pwd
67-
6862
- name: Test
6963
env:
7064
MPLBACKEND: agg

tests/test_generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_cli_read_generic_image_invalid_data_axes(runner: CliRunner) -> None:
8787
],
8888
)
8989
assert result.exit_code != 0, result.output
90-
assert "'invalid_axes' is not one of 'cyx', 'czyx'." in result.output
90+
assert "data_axes must be a permutation of 'cyx' or 'czyx'." in result.exc_info[1].args[0]
9191

9292

9393
@pytest.mark.parametrize("cli", [True, False])

0 commit comments

Comments
 (0)