def test(course, tid=None, time=None):
    """
    Run tests on the selected exercise.
    """
    if time is not None:
        conf.tests_show_time = time
    if tid is not None:
        return run_test(Exercise.byid(tid))
    else:
        sel = Exercise.get_selected()
        if not sel:
            raise NoExerciseSelected()
        return run_test(sel)
def test ( course , tid = None , time = None ) : if time is not None : conf . tests_show_time = time if tid is not None : return run_test ( Exercise . byid ( tid ) ) else : sel = Exercise . get_selected ( ) if not sel : raise NoExerciseSelected ( ) return run_test ( sel )
Run tests on the selected exercise.