Skip to content

Commit

Permalink
CI fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Nov 12, 2023
1 parent 7412131 commit 451eabc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 8 additions & 9 deletions tests/test_bidscoiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 451eabc

Please sign in to comment.