From 451eabcad805fcdeee4d90c8dba74ae8ac9f13ac Mon Sep 17 00:00:00 2001 From: Marcel Zwiers Date: Sun, 12 Nov 2023 19:52:37 +0100 Subject: [PATCH] CI fix? --- .github/workflows/tests.yaml | 5 ++--- tests/test_bidscoiner.py | 17 ++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2b2c25b3..598c5025 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,8 +47,7 @@ jobs: - name: Tests with pytest run: | - if [ "$RUNNER_OS" != "Windows" ]; then - export DUECREDIT_ENABLE=yes fi pytest tests - shell: bash + env: + DUECREDIT_ENABLE: yes diff --git a/tests/test_bidscoiner.py b/tests/test_bidscoiner.py index 86b3db90..52a097ca 100644 --- a/tests/test_bidscoiner.py +++ b/tests/test_bidscoiner.py @@ -35,15 +35,14 @@ def test_bidscoiner(raw_dicomdir, bids_dicomdir, bidsmap_dicomdir): assert metadict.get('SeriesDescription') == 'TestExtAtrributes' assert metadict.get('Comment') == 'TestExtComment' - if os.getenv('DUECREDIT_ENABLE') == 'yes': - with Path('./.duecredit.p').open('rb') as fid: - credits = pickle.load(fid) - assert '10.3389/fninf.2021.770608' in [key.entry_key for key in credits.citations.keys()] - for key, val in credits.citations.items(): - if key.entry_key == '10.3389/fninf.2021.770608': - assert val.cite_module == True - assert val.path == 'bidscoin' - assert val.version == __version__ + with Path('./.duecredit.p').open('rb') as fid: + credits = pickle.load(fid) + assert '10.3389/fninf.2021.770608' in [key.entry_key for key in credits.citations.keys()] + for key, val in credits.citations.items(): + if key.entry_key == '10.3389/fninf.2021.770608': + assert val.cite_module == True + assert val.path == 'bidscoin' + assert val.version == __version__ # def test_addmetadata(bids_dicomdir, bidsmap_dicomdir):