Skip to content

Commit 8935e25

Browse files
committed
ENH: Use @assert_cwd_unchanged for test_embed_dicom_and_nifti_metadata
1 parent 7312b70 commit 8935e25

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

heudiconv/tests/test_dicoms.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
from heudiconv.cli.run import main as runner
88
from heudiconv.convert import nipype_convert
99
from heudiconv.dicoms import parse_private_csa_header, embed_dicom_and_nifti_metadata
10-
from .utils import TESTS_DATA_PATH
10+
from .utils import (
11+
assert_cwd_unchanged,
12+
TESTS_DATA_PATH,
13+
)
1114

1215
# Public: Private DICOM tags
1316
DICOM_FIELDS_TO_TEST = {
@@ -27,6 +30,7 @@ def test_private_csa_header(tmpdir):
2730
runner(['--files', dcm_file, '-c' 'none', '-f', 'reproin'])
2831

2932

33+
@assert_cwd_unchanged(ok_to_chdir=True) # so we cd back after tmpdir.chdir
3034
def test_embed_dicom_and_nifti_metadata(tmpdir):
3135
"""Test dcmstack's additional fields"""
3236
tmpdir.chdir()

0 commit comments

Comments
 (0)