|
def | assertParseResultsEquals (self, result, expected_list=None, expected_dict=None, msg=None) |
|
def | assertParseAndCheckList (self, expr, test_string, expected_list, msg=None, verbose=True) |
|
def | assertParseAndCheckDict (self, expr, test_string, expected_dict, msg=None, verbose=True) |
|
def | assertRunTestResults (self, run_tests_report, expected_parse_results=None, msg=None) |
|
def | assertRaisesParseException (self, exc_type=ParseException, msg=None) |
|
A mixin class to add parse results assertion methods to normal unittest.TestCase classes.
def assertRunTestResults |
( |
|
self, |
|
|
|
run_tests_report, |
|
|
|
expected_parse_results = None , |
|
|
|
msg = None |
|
) |
| |
Unit test assertion to evaluate output of ParserElement.runTests(). If a list of
list-dict tuples is given as the expected_parse_results argument, then these are zipped
with the report tuples returned by runTests and evaluated using assertParseResultsEquals.
Finally, asserts that the overall runTests() success value is True.
:param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests
:param expected_parse_results (optional): [tuple(str, list, dict, Exception)]