270
by dilshan_a
Initial check in for test framework, and example problems |
1 |
from parse_tute import * |
2 |
||
3 |
def print_results((name, results)): |
|
4 |
""" Print the output of a testsuite nicely """
|
|
5 |
print name |
|
6 |
for (case_name, test_results) in results: |
|
7 |
print "Case: " + case_name |
|
8 |
for test_result in test_results: |
|
9 |
print " " + test_result |
|
10 |
print
|
|
11 |
||
12 |
problem_suite = parse_tutorial_file('all_input_text.xml') |
|
13 |
print_results(problem_suite.run_tests("all_input.py")) |
|
14 |
||
15 |
problem_suite = parse_tutorial_file('fib_text.xml') |
|
16 |
print_results(problem_suite.run_tests("fib.py")) |
|
17 |