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
bob
bob.bio.base
Commits
e06294e8
Commit
e06294e8
authored
Oct 20, 2016
by
Manuel Günther
Browse files
Fixed wrong usage of setattr
parent
1e417e83
Pipeline
#5006
running with stages
in 6 minutes and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/test/test_scripts.py
View file @
e06294e8
...
...
@@ -253,6 +253,30 @@ def test_verify_missing():
shutil
.
rmtree
(
test_dir
)
def
test_verify_execute_only
():
test_dir
=
tempfile
.
mkdtemp
(
prefix
=
'bobtest_'
)
# define dummy parameters
parameters
=
[
'-d'
,
'dummy'
,
'-p'
,
'dummy'
,
'-e'
,
'dummy'
,
'-a'
,
'dummy'
,
'--zt-norm'
,
'--allow-missing-files'
,
'-vs'
,
'test_missing'
,
'--temp-directory'
,
test_dir
,
'--result-directory'
,
test_dir
,
'--preferred-package'
,
'bob.bio.base'
,
'--imports'
,
'bob.bio.base.test.dummy'
,
'--execute-only'
,
'preprocessing'
,
'score-computation'
,
'--dry-run'
]
try
:
from
bob.bio.base.script.verify
import
main
main
(
parameters
)
def
test_internal_raises
():
test_dir
=
tempfile
.
mkdtemp
(
prefix
=
'bobtest_'
)
# define dummy parameters
...
...
bob/bio/base/tools/command_line.py
View file @
e06294e8
...
...
@@ -271,7 +271,7 @@ def initialize(parsers, command_line_parameters = None, skips = []):
if
skips
is
not
None
and
args
.
execute_only
is
not
None
:
for
skip
in
skips
:
if
skip
not
in
args
.
execute_only
:
setattr
(
"
args
"
,
"skip_%s"
%
skip
.
replace
(
"-"
,
"_"
),
True
)
setattr
(
args
,
"skip_%s"
%
skip
.
replace
(
"-"
,
"_"
),
True
)
if
args
.
parallel
is
not
None
:
args
.
grid
=
bob
.
bio
.
base
.
grid
.
Grid
(
"local"
,
number_of_parallel_processes
=
args
.
parallel
)
...
...
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