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

« back to all changes in this revision

Viewing changes to www/apps/tutorialservice/test/parse_tute.py

  • Committer: dilshan_a
  • Date: 2008-01-25 01:03:06 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:299
Test framework now handles exceptions as valid outputs for scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
            test_type = child.getAttribute('type')
76
76
            if test_type == '': test_type = DEFAULT_TEST_TYPE
77
77
            part.add_stderr_test(getTextData(child), test_type)
 
78
        elif child.tagName == 'exception':
 
79
            test_type = child.getAttribute('type')
 
80
            if test_type == '': test_type = DEFAULT_TEST_TYPE
 
81
            part.add_exception_test(getTextData(child), test_type)
78
82
        elif child.tagName == 'file':
79
83
            test_type = child.getAttribute('type')
80
84
            if test_type == '': test_type = DEFAULT_TEST_TYPE
123
127
            if not arg_val:
124
128
                raise ParseException("Incomplete argument in case %s" %case_name)
125
129
            case.add_arg(arg_val, arg_name)
 
130
        elif child.tagName == 'exception':
 
131
            exception_name = child.getAttribute('name')
 
132
            if not exception_name:
 
133
                raise ParseException("Incomplete exception in case %s" %case_name)
 
134
            case.add_exception(exception_name)
126
135
        elif child.tagName == 'function':
127
136
            # specify a test case part
128
137
            case.add_part(getCasePartData(child))