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
930a1008
Commit
930a1008
authored
2 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: unit tests for bianca wrapper functions
parent
c06ef973
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_wrappers/test_wrappers.py
+37
-1
37 additions, 1 deletion
tests/test_wrappers/test_wrappers.py
with
37 additions
and
1 deletion
tests/test_wrappers/test_wrappers.py
+
37
−
1
View file @
930a1008
...
...
@@ -568,7 +568,7 @@ def test_fslmerge():
run
.
dryrun
(),
\
mockFSLDIR
(
bin
=
(
'
fslmerge
'
,))
as
fsldir
:
fslmerge
=
op
.
join
(
fsldir
,
'
bin
'
,
'
fslmerge
'
)
fslmerge
=
op
.
join
(
fsldir
,
'
bin
'
,
'
fslmerge
'
)
expected
=
f
'
{
fslmerge
}
-x out in1 in2 in3
'
result
=
fw
.
fslmerge
(
'
x
'
,
'
out
'
,
'
in1
'
,
'
in2
'
,
'
in3
'
)
...
...
@@ -581,3 +581,39 @@ def test_fslmerge():
expected
=
f
'
{
fslmerge
}
-tr out in1 in2 in3 123
'
result
=
fw
.
fslmerge
(
'
tr
'
,
'
out
'
,
'
in1
'
,
'
in2
'
,
'
in3
'
,
123
)
assert
result
.
stdout
[
0
]
==
expected
def
test_bianca
():
with
asrt
.
disabled
(),
\
run
.
dryrun
(),
\
mockFSLDIR
(
bin
=
(
'
bianca
'
,
'
bianca_cluster_stats
'
,
'
bianca_overlap_measures
'
,
'
bianca_perivent_deep
'
,
'
make_bianca_mask
'
))
as
fsldir
:
bianca
=
op
.
join
(
fsldir
,
'
bin
'
,
'
bianca
'
)
bianca_cluster_stats
=
op
.
join
(
fsldir
,
'
bin
'
,
'
bianca_cluster_stats
'
)
bianca_overlap_measures
=
op
.
join
(
fsldir
,
'
bin
'
,
'
bianca_overlap_measures
'
)
bianca_perivent_deep
=
op
.
join
(
fsldir
,
'
bin
'
,
'
bianca_perivent_deep
'
)
make_bianca_mask
=
op
.
join
(
fsldir
,
'
bin
'
,
'
make_bianca_mask
'
)
expected
=
f
'
{
bianca
}
--singlefile sfile --patch3d --querysubjectnum 3 -v
'
result
=
fw
.
bianca
(
'
sfile
'
,
patch3d
=
True
,
querysubjectnum
=
3
,
v
=
True
)
assert
result
[
0
]
==
expected
expected
=
f
'
{
bianca_cluster_stats
}
out 9 5 mask
'
result
=
fw
.
bianca_cluster_stats
(
'
out
'
,
9
,
5
,
'
mask
'
)
assert
result
.
stdout
[
0
]
==
expected
expected
=
f
'
{
bianca_overlap_measures
}
lesions 9 mask 1
'
result
=
fw
.
bianca_overlap_measures
(
'
lesions
'
,
9
,
'
mask
'
,
True
)
assert
result
.
stdout
[
0
]
==
expected
expected
=
f
'
{
bianca_perivent_deep
}
wmh vent 2 out
'
result
=
fw
.
bianca_perivent_deep
(
'
wmh
'
,
'
vent
'
,
'
out
'
,
2
)
assert
result
.
stdout
[
0
]
==
expected
expected
=
f
'
{
make_bianca_mask
}
struc csf warp 1
'
result
=
fw
.
make_bianca_mask
(
'
struc
'
,
'
csf
'
,
'
warp
'
,
True
)
assert
result
.
stdout
[
0
]
==
expected
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