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

« back to all changes in this revision

Viewing changes to test/test_framework/test.py

  • Committer: mattgiuca
  • Date: 2008-01-25 06:20:32 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:313
test/test_framework: Updated examples, a bit of better descriptions, sample
    partial solutions, etc.

Added all sample subject material.
This has been copied from test/test_framework and modified slightly.
There is now a subject "sample" with 2 worksheets. The 1st worksheet has 3
exercises. These work in IVLE by default.

setup.py: Added code to install subjects into the designated directory. This
means that installing IVLE will result in the sample subjects being
immediately available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
import sys
3
 
sys.path.append('../../www/apps/tutorialservice/test/')
 
3
sys.path.append('../../www/apps/tutorialservice/test/'))
4
4
 
5
 
from parse_exercise import *
 
5
from parse_tute import *
6
6
 
7
7
def print_results(problem):
8
8
    print "Problem: %s" %problem['name']
29
29
    pyfile = basename + '.py'
30
30
 
31
31
    print "Testing:", basename
32
 
    problem_suite = parse_exercise_file(xmlfile)
 
32
    problem_suite = parse_tutorial_file(xmlfile)
33
33
    print_results(problem_suite.run_tests(file(pyfile).read()))