Skip to content
Snippets Groups Projects
Commit 97363253 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: update fslsub test (a change in my dev environment?)

parent 833be15c
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ import textwrap as tw ...@@ -14,6 +14,7 @@ import textwrap as tw
import contextlib import contextlib
import argparse import argparse
import fsl
from fsl.utils import fslsub from fsl.utils import fslsub
from fsl.utils.tempdir import tempdir from fsl.utils.tempdir import tempdir
...@@ -28,6 +29,13 @@ import os ...@@ -28,6 +29,13 @@ import os
import os.path as op import os.path as op
import sys import sys
import subprocess as sp import subprocess as sp
fslpydir = op.join('{}', '..')
env = dict(os.environ)
env['PYTHONPATH'] = fslpydir
sys.path.insert(0, fslpydir)
import fsl import fsl
args = sys.argv[1:] args = sys.argv[1:]
...@@ -45,9 +53,6 @@ for i in range(len(args)): ...@@ -45,9 +53,6 @@ for i in range(len(args)):
args = args[i:] args = args[i:]
env = dict(os.environ)
env['PYTHONPATH'] = op.join(op.dirname(fsl.__file__), '..')
cmd = op.basename(args[0]) cmd = op.basename(args[0])
jobid = random.randint(1, 9999) jobid = random.randint(1, 9999)
...@@ -57,7 +62,7 @@ with open('{{}}.o{{}}'.format(cmd, jobid), 'w') as stdout, \ ...@@ -57,7 +62,7 @@ with open('{{}}.o{{}}'.format(cmd, jobid), 'w') as stdout, \
print(str(jobid)) print(str(jobid))
sys.exit(0) sys.exit(0)
""".format(sys.executable).strip() """.format(sys.executable, op.dirname(fsl.__file__)).strip()
@contextlib.contextmanager @contextlib.contextmanager
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment