Example #1
0
def test_group(name):
    stack.append(name)
    scores.setdefault(current_test(), 0)
    try:
        yield
    finally:
        stack.pop(len(stack) - 1)
Example #2
0
 def wrapper(*args, **kwargs):
     with test_group(func.__name__):
         for test_name, min_score in requires.iteritems():
             if isinstance(test_name, types.FunctionType):
                 test_name = test_name.__name__
             your_score = scores[test_name]
             if your_score < min_score:
                 msg = "Skipping `%s` since your score in `%s` (%d) does not meet the minimum requirement (%d)." % (
                     current_test(), test_name, your_score, min_score)
                 click.secho(msg, fg='blue', bold=True)
                 return
         return func(*args, **kwargs)
Example #3
0
 def base_log_path(self):
     return "%s/%s/%s/" % (config["log_path"], current_test(), self.uuid)