diff --git a/niworkflows/interfaces/gradunwarp.py b/niworkflows/interfaces/gradunwarp.py index 61652be208b..a6816d6883a 100644 --- a/niworkflows/interfaces/gradunwarp.py +++ b/niworkflows/interfaces/gradunwarp.py @@ -29,6 +29,12 @@ SimpleInterface ) +has_gradunwarp = False +try: + import gradunwrap + has_gradunwarp=True +except ImportError: + pass class _GradUnwarpInputSpec(TraitedSpec): infile = File(exists=True, mandatory=True, desc="input image to be corrected") diff --git a/niworkflows/interfaces/tests/test_bids.py b/niworkflows/interfaces/tests/test_bids.py index 007c943d60e..365a62356a8 100644 --- a/niworkflows/interfaces/tests/test_bids.py +++ b/niworkflows/interfaces/tests/test_bids.py @@ -300,11 +300,7 @@ def test_DerivativesDataSink_build_path( **entities, ) -<<<<<<< HEAD if isinstance(expectation, type): -======= - if type(expectation) is type(Exception): ->>>>>>> 601d1d1f (fix flake8 tests) with pytest.raises(expectation): dds.run() return diff --git a/niworkflows/testing.py b/niworkflows/testing.py index 37ee9b09fed..8c29e02873b 100644 --- a/niworkflows/testing.py +++ b/niworkflows/testing.py @@ -42,4 +42,3 @@ def wrapper(*args, **kwargs): has_fsl = fsl.Info.version() is not None has_freesurfer = fs.Info.version() is not None has_afni = afni.Info.version() is not None -has_gradunwarp = gradunwarp.has_gradunwarp