~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to test/test_framework/tests.py

  • Committer: William Grant
  • Date: 2009-12-10 04:36:43 UTC
  • mto: This revision was merged to the branch mainline in revision 1398.
  • Revision ID: grantw@unimelb.edu.au-20091210043643-mifn2gtw0ias3pnx
In the Console wrapper, unpickle the exception into the original dict and return that, not just the exception.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
import sys
3
3
sys.path.append('../../www/apps/tutorialservice/test/')
4
4
 
5
 
from parse_tute import *
 
5
from parse_exercise import *
6
6
 
7
7
def print_results(problem):
8
8
    print "Problem: %s" %problem['name']
23
23
                        print "  Failed: %s -- %s" %(part['description'],part['error_message'])
24
24
    print
25
25
    
26
 
problem_suite = parse_tutorial_file('filesum_text.xml')
 
26
problem_suite = parse_exercise_file('filesum_text.xml')
27
27
print_results(problem_suite.run_tests(file("filesum.py").read()))
28
28
 
29
 
problem_suite = parse_tutorial_file('hello_text.xml')
 
29
problem_suite = parse_exercise_file('hello_text.xml')
30
30
print_results(problem_suite.run_tests(file("hello.py").read()))
31
31
 
32
 
problem_suite = parse_tutorial_file('all_input_text.xml')
 
32
problem_suite = parse_exercise_file('all_input_text.xml')
33
33
print_results(problem_suite.run_tests(file("all_input.py").read()))
34
34
 
35
 
problem_suite = parse_tutorial_file('fib_text.xml')
 
35
problem_suite = parse_exercise_file('fib_text.xml')
36
36
print_results(problem_suite.run_tests(file("fib.py").read()))