Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
6c3a08e3
Commit
6c3a08e3
authored
4 years ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
BUG: make sure original path is in PYTHONPATH
parent
782c5b55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_fslsub.py
+5
-2
5 additions, 2 deletions
tests/test_fslsub.py
with
5 additions
and
2 deletions
tests/test_fslsub.py
+
5
−
2
View file @
6c3a08e3
...
...
@@ -267,6 +267,7 @@ def _bad_func():
def
test_func_to_cmd
():
cwd
=
os
.
getcwd
()
with
tempdir
():
for
tmp_dir
in
(
None
,
'
.
'
):
for
clean
in
(
'
never
'
,
'
on_success
'
,
'
always
'
):
...
...
@@ -274,7 +275,8 @@ def test_func_to_cmd():
cmd
=
fslsub
.
func_to_cmd
(
_good_func
,
clean
=
clean
,
tmp_dir
=
tmp_dir
,
verbose
=
verbose
)
fn
=
cmd
.
split
()[
-
1
]
assert
op
.
exists
(
fn
)
stdout
,
stderr
,
exitcode
=
run
.
run
(
cmd
,
exitcode
=
True
,
stdout
=
True
,
stderr
=
True
)
stdout
,
stderr
,
exitcode
=
run
.
run
(
cmd
,
exitcode
=
True
,
stdout
=
True
,
stderr
=
True
,
env
=
{
"
PYTHONPATH
"
:
cwd
})
assert
exitcode
==
0
if
clean
==
'
never
'
:
assert
op
.
exists
(
fn
),
"
Successful job got removed, even though this was not requested
"
...
...
@@ -288,7 +290,8 @@ def test_func_to_cmd():
cmd
=
fslsub
.
func_to_cmd
(
_bad_func
,
clean
=
clean
,
tmp_dir
=
tmp_dir
)
fn
=
cmd
.
split
()[
-
1
]
assert
op
.
exists
(
fn
)
stdout
,
stderr
,
exitcode
=
run
.
run
(
cmd
,
exitcode
=
True
,
stdout
=
True
,
stderr
=
True
)
stdout
,
stderr
,
exitcode
=
run
.
run
(
cmd
,
exitcode
=
True
,
stdout
=
True
,
stderr
=
True
,
env
=
{
'
PYTHONPATH
'
:
cwd
})
assert
exitcode
!=
0
if
clean
==
'
always
'
:
assert
not
op
.
exists
(
fn
),
"
Failing job should always be removed if requested
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment