Commit e06294e8 authored by Manuel Günther's avatar Manuel Günther
Browse files

Fixed wrong usage of setattr

parent 1e417e83
Pipeline #5006 running with stages
in 6 minutes and 42 seconds
......@@ -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
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment