Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
aa858ad8
Commit
aa858ad8
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Extra vest tests
parent
9f204083
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_vest.py
+30
-2
30 additions, 2 deletions
tests/test_vest.py
with
30 additions
and
2 deletions
tests/test_vest.py
+
30
−
2
View file @
aa858ad8
...
...
@@ -111,11 +111,37 @@ testfile4Colours = np.array([
testfile5
=
"""
Obviously not a VEST file
"""
testfile6
=
"""
%BeginInstance
/SavedInstanceClassName /ClassLUT
/PseudoColourmap [
<-color{0.0,1.0,5.0}->
<-color{1.0,2.0,4.0}->
<-color{2.0,3.0,3.0}->
]
>>
%%EndInstance
%%EOF
"""
testfile7
=
"""
%%BeginInstance
/SavedInstanceClassName /ClassLUT
/PseudoColourmap [
<-color{0.0,1.0,5.0}->
<-color{1.0,2.0,4.0}->
<-color{2.0,3.0,3.0}->
]
>>
%%EndInstance
%%EOF
"""
def
_createFiles
(
testdir
):
names
=
[
'
testfile1
'
,
'
testfile2
'
,
'
testfile3
'
,
'
testfile4
'
,
'
testfile5
'
]
texts
=
[
testfile1
,
testfile2
,
testfile3
,
testfile4
,
testfile5
]
names
=
[
'
testfile1
'
,
'
testfile2
'
,
'
testfile3
'
,
'
testfile4
'
,
'
testfile5
'
,
'
testfile6
'
,
'
testfile7
'
]
texts
=
[
testfile1
,
testfile2
,
testfile3
,
testfile4
,
testfile5
,
testfile6
,
testfile7
]
for
name
,
text
in
zip
(
names
,
texts
):
filename
=
op
.
join
(
testdir
,
'
{}.txt
'
.
format
(
name
))
...
...
@@ -137,6 +163,8 @@ def test_looksLikeVestLutFile():
assert
vest
.
looksLikeVestLutFile
(
op
.
join
(
testdir
,
'
testfile3.txt
'
))
assert
vest
.
looksLikeVestLutFile
(
op
.
join
(
testdir
,
'
testfile4.txt
'
))
assert
not
vest
.
looksLikeVestLutFile
(
op
.
join
(
testdir
,
'
testfile5.txt
'
))
assert
vest
.
looksLikeVestLutFile
(
op
.
join
(
testdir
,
'
testfile6.txt
'
))
assert
vest
.
looksLikeVestLutFile
(
op
.
join
(
testdir
,
'
testfile7.txt
'
))
finally
:
shutil
.
rmtree
(
testdir
)
...
...
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