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
9bc5629f
Commit
9bc5629f
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Test fast wrapper
parent
e90cfffc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_wrappers.py
+15
-0
15 additions, 0 deletions
tests/test_wrappers.py
tests/test_wrapperutils.py
+0
-5
0 additions, 5 deletions
tests/test_wrapperutils.py
with
15 additions
and
5 deletions
tests/test_wrappers.py
+
15
−
0
View file @
9bc5629f
...
@@ -272,3 +272,18 @@ def test_fslmaths():
...
@@ -272,3 +272,18 @@ def test_fslmaths():
assert
result
.
output
[
0
]
==
expected
assert
result
.
output
[
0
]
==
expected
# TODO test LOAD output
# TODO test LOAD output
def
test_fast
():
with
asrt
.
disabled
(),
run
.
dryrun
(),
mockFSLDIR
()
as
fsldir
:
cmd
=
op
.
join
(
fsldir
,
'
bin
'
,
'
fast
'
)
result
=
fw
.
fast
(
'
input
'
,
'
myseg
'
,
n_classes
=
3
)
expected
=
[
cmd
,
'
-v
'
,
'
--out=myseg
'
,
'
--class=3
'
,
'
input
'
]
assert
result
.
output
[
0
]
==
'
'
.
join
(
expected
)
result
=
fw
.
fast
((
'
in1
'
,
'
in2
'
,
'
in3
'
),
'
myseg
'
,
n_classes
=
3
)
expected
=
[
cmd
,
'
-v
'
,
'
--out=myseg
'
,
'
--class=3
'
,
'
in1
'
,
'
in2
'
,
'
in3
'
]
assert
result
.
output
[
0
]
==
'
'
.
join
(
expected
)
This diff is collapsed.
Click to expand it.
tests/test_wrapperutils.py
+
0
−
5
View file @
9bc5629f
...
@@ -318,14 +318,9 @@ def test_fileOrThing_sequence():
...
@@ -318,14 +318,9 @@ def test_fileOrThing_sequence():
if
isinstance
(
arrs
,
six
.
string_types
):
if
isinstance
(
arrs
,
six
.
string_types
):
arrs
=
[
arrs
]
arrs
=
[
arrs
]
print
(
'
Loading from files
'
,
arrs
)
arrs
=
[
np
.
loadtxt
(
a
)
for
a
in
arrs
]
arrs
=
[
np
.
loadtxt
(
a
)
for
a
in
arrs
]
res
=
np
.
sum
(
arrs
,
axis
=
0
)
res
=
np
.
sum
(
arrs
,
axis
=
0
)
print
(
'
result
'
,
res
)
np
.
savetxt
(
out
,
res
)
np
.
savetxt
(
out
,
res
)
inputs
=
[
np
.
random
.
randint
(
1
,
10
,
(
3
,
3
))
for
i
in
range
(
4
)]
inputs
=
[
np
.
random
.
randint
(
1
,
10
,
(
3
,
3
))
for
i
in
range
(
4
)]
...
...
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