Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
ac0ba15a
Commit
ac0ba15a
authored
Nov 08, 2017
by
Paul McCarthy
🚵
Browse files
bugfix to test
parent
5f11f96f
Pipeline
#1210
canceled with stages
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
tests/test_image.py
View file @
ac0ba15a
...
...
@@ -750,9 +750,14 @@ def _test_Image_changeData(imgtype):
newdmin
=
dmin
-
100
newdmax
=
dmax
+
100
# random value below the data range
minx
,
miny
,
minz
=
randvox
()
img
[
minx
,
miny
,
minz
]
=
newdmin
# random value below the data range,
# making sure not to overwrite the
# max
while
True
:
minx
,
miny
,
minz
=
randvox
()
if
not
np
.
isclose
(
img
[
minx
,
miny
,
minz
],
dmax
):
img
[
minx
,
miny
,
minz
]
=
newdmin
break
assert
notified
.
get
(
'data'
,
False
)
assert
notified
.
get
(
'dataRange'
,
False
)
...
...
@@ -762,13 +767,14 @@ def _test_Image_changeData(imgtype):
notified
.
pop
(
'data'
)
notified
.
pop
(
'dataRange'
)
# random value above the data range
maxx
,
maxy
,
maxz
=
randvox
()
while
(
maxx
,
maxy
,
maxz
)
==
(
minx
,
miny
,
minz
)
:
# random value above the data range
,
# making sure not to overwrite the
# min
while
True
:
maxx
,
maxy
,
maxz
=
randvox
()
img
[
maxx
,
maxy
,
maxz
]
=
newdmax
if
not
np
.
isclose
(
img
[
maxx
,
maxy
,
maxz
],
newdmin
):
img
[
maxx
,
maxy
,
maxz
]
=
newdmax
break
assert
notified
.
get
(
'data'
,
False
)
assert
notified
.
get
(
'dataRange'
,
False
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment