Skip to content

Commit 15cd86f

Browse files
committed
fix imports in new tests
1 parent 86792b9 commit 15cd86f

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

nipype/interfaces/base/tests/test_core.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
import pytest
1111

12-
from ... import config
13-
from ...testing import example_data
14-
from .. import base as nib
15-
from ..base import Undefined
12+
from .... import config
13+
from ....testing import example_data
14+
from ... import base as nib
1615

1716
standard_library.install_aliases()
1817

@@ -91,7 +90,7 @@ class DerivedInterface(nib.BaseInterface):
9190
assert DerivedInterface._get_filecopy_info()[0]['copy']
9291
assert DerivedInterface._get_filecopy_info()[1]['key'] == 'zoo'
9392
assert not DerivedInterface._get_filecopy_info()[1]['copy']
94-
assert DerivedInterface().inputs.foo == Undefined
93+
assert DerivedInterface().inputs.foo == nib.Undefined
9594
with pytest.raises(ValueError):
9695
DerivedInterface()._check_mandatory_inputs()
9796
assert DerivedInterface(goo=1)._check_mandatory_inputs() is None
@@ -107,7 +106,7 @@ def _run_interface(self, runtime):
107106
return runtime
108107

109108
assert DerivedInterface2.help() is None
110-
assert DerivedInterface2()._outputs().foo == Undefined
109+
assert DerivedInterface2()._outputs().foo == nib.Undefined
111110
with pytest.raises(NotImplementedError):
112111
DerivedInterface2(goo=1).run()
113112

@@ -295,7 +294,7 @@ def test_Commandline():
295294
nib.CommandLine()
296295
ci = nib.CommandLine(command='which')
297296
assert ci.cmd == 'which'
298-
assert ci.inputs.args == Undefined
297+
assert ci.inputs.args == nib.Undefined
299298
ci2 = nib.CommandLine(command='which', args='ls')
300299
assert ci2.cmdline == 'which ls'
301300
ci3 = nib.CommandLine(command='echo')

nipype/interfaces/base/tests/test_resource_monitor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import pytest
1212

1313
# Import packages
14-
from nipype import config
15-
from nipype.utils.profiler import _use_resources
16-
from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec
17-
from nipype.interfaces import utility as niu
14+
from .... import config
15+
from ....utils.profiler import _use_resources
16+
from ...base import traits, CommandLine, CommandLineInputSpec
17+
from ... import utility as niu
1818

1919
# Try to enable the resource monitor
2020
config.enable_resource_monitor()

nipype/interfaces/base/tests/test_specs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import pytest
1010

11-
from ...utils.filemanip import split_filename
12-
from .. import base as nib
13-
from ..base import traits, Undefined
11+
from ....utils.filemanip import split_filename
12+
from ... import base as nib
13+
from ...base import traits, Undefined
1414

1515
standard_library.install_aliases()
1616

nipype/interfaces/base/tests/test_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from builtins import open
88
from future import standard_library
99

10-
from ...utils.filemanip import md5
11-
from .. import base as nib
10+
from ....utils.filemanip import md5
11+
from ... import base as nib
1212

1313
standard_library.install_aliases()
1414

0 commit comments

Comments
 (0)