Skip to content
Snippets Groups Projects
Commit 4877170d authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Fix using of bob.extension.rc

parent ccdcd628
No related branches found
No related tags found
1 merge request!12Streamlining
Pipeline #38850 passed
......@@ -9,7 +9,6 @@ import bob.extension
from ..jsondataset import JSONDataset
from ..loader import load_pil_rgb, load_pil_1
_protocols = [
pkg_resources.resource_filename(__name__, "default.json"),
pkg_resources.resource_filename(__name__, "second-annotation.json"),
......
......@@ -19,10 +19,9 @@ def rc_variable_set(name):
def wrapped_function(test):
@functools.wraps(test)
def wrapper(*args, **kwargs):
if bob.extension.rc[name]:
return test(*args, **kwargs)
else:
if name not in bob.extension.rc:
raise nose.plugins.skip.SkipTest("Bob's RC variable '%s' is not set" % name)
return test(*args, **kwargs)
return wrapper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment