Skip to content

Commit e23dafc

Browse files
TEST: Only add virtualenv bindir if virtualenv environment variable exists.
1 parent 736cca0 commit e23dafc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/tests/test_parrec2nii.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
from ..tmpdirs import InTemporaryDirectory
1212
## Possible locations of the parrec2nii executable;
1313
BINDIRS = [join(dirname(dirname(dirname(__file__))), 'bin'),
14-
sys.executable,
15-
join(os.environ['VIRTUAL_ENV'],'bin')]
14+
sys.executable]
15+
if 'VIRTUAL_ENV' in os.environ:
16+
BINDIRS.append(join(os.environ['VIRTUAL_ENV'],'bin'))
1617

1718

1819
AN_OLD_AFFINE = numpy.array(

0 commit comments

Comments
 (0)