Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
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
bob
bob.bio.base
Commits
303ed8f2
There was a problem fetching the pipeline summary.
Commit
303ed8f2
authored
8 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Implemented test case for
#33
parent
5021ffe1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/base/test/test_scripts.py
+24
-20
24 additions, 20 deletions
bob/bio/base/test/test_scripts.py
with
24 additions
and
20 deletions
bob/bio/base/test/test_scripts.py
+
24
−
20
View file @
303ed8f2
from
__future__
import
print_function
import
bob.measure
import
os
import
shutil
import
tempfile
import
numpy
import
nose
import
bob.io.image
import
bob.bio.base
...
...
@@ -76,8 +75,6 @@ def test_verify_config():
'
--result-directory
'
,
test_dir
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_config
'
)
...
...
@@ -95,8 +92,6 @@ def test_verify_algorithm_noprojection():
'
--result-directory
'
,
test_dir
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
algorithm_noprojection
'
)
...
...
@@ -116,8 +111,6 @@ def test_verify_resources():
'
--preferred-package
'
,
'
bob.bio.base
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_resource
'
)
...
...
@@ -136,8 +129,6 @@ def test_verify_commandline():
'
--imports
'
,
'
bob.bio.base.test.dummy
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_commandline
'
)
...
...
@@ -164,8 +155,6 @@ def test_verify_parallel():
'
--preferred-package
'
,
'
bob.bio.base
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_parallel
'
)
...
...
@@ -185,8 +174,6 @@ def test_verify_compressed():
'
--preferred-package
'
,
'
bob.bio.base
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_compressed
'
,
score_modifier
=
(
'
scores
'
,
'
.tar.bz2
'
))
...
...
@@ -206,8 +193,6 @@ def test_verify_calibrate():
'
--preferred-package
'
,
'
bob.bio.base
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_calibrate
'
,
'
-calibrated
'
,
score_modifier
=
(
'
calibrated
'
,
''
))
...
...
@@ -227,8 +212,6 @@ def test_verify_fileset():
'
--imports
'
,
'
bob.bio.base.test.dummy
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'
test_fileset
'
,
ref_modifier
=
"
-fileset
"
)
...
...
@@ -249,8 +232,6 @@ def test_verify_missing():
'
--imports
'
,
'
bob.bio.base.test.dummy
'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
try
:
from
bob.bio.base.script.verify
import
main
main
(
parameters
)
...
...
@@ -273,6 +254,29 @@ def test_verify_missing():
shutil
.
rmtree
(
test_dir
)
def
test_internal_raises
():
test_dir
=
tempfile
.
mkdtemp
(
prefix
=
'
bobtest_
'
)
# define dummy parameters
parameters
=
[
'
-d
'
,
'
dummy
'
,
'
-p
'
,
'
dummy
'
,
'
-e
'
,
'
dummy
'
,
'
-a
'
,
'
dummy
'
,
'
-vs
'
,
'
test_raises
'
,
'
--temp-directory
'
,
test_dir
,
'
--result-directory
'
,
test_dir
,
'
--preferred-package
'
,
'
bob.bio.base
'
,
'
--imports
'
,
'
bob.bio.base.test.dummy
'
]
from
bob.bio.base.script.verify
import
main
for
option
,
value
in
((
"
--group
"
,
"
dev
"
),
(
"
--model-type
"
,
"
N
"
),
(
"
--score-type
"
,
"
A
"
)):
internal
=
parameters
+
[
option
,
value
]
nose
.
tools
.
assert_raises
(
ValueError
,
main
,
internal
)
shutil
.
rmtree
(
test_dir
)
def
test_fusion
():
# tests that the fuse_scores script is doing something useful
test_dir
=
tempfile
.
mkdtemp
(
prefix
=
'
bobtest_
'
)
...
...
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