Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pip._vendor.pyparsing.testing.pyparsing_test.TestParseResultsAsserts Class Reference

Public Member Functions

 assertParseResultsEquals (self, result, expected_list=None, expected_dict=None, msg=None)
 
 assertParseAndCheckList (self, expr, test_string, expected_list, msg=None, verbose=True)
 
 assertParseAndCheckDict (self, expr, test_string, expected_dict, msg=None, verbose=True)
 
 assertRunTestResults (self, run_tests_report, expected_parse_results=None, msg=None)
 
 assertRaisesParseException (self, exc_type=ParseException, msg=None)
 

Detailed Description

A mixin class to add parse results assertion methods to normal unittest.TestCase classes.

Member Function Documentation

◆ assertParseAndCheckDict()

pip._vendor.pyparsing.testing.pyparsing_test.TestParseResultsAsserts.assertParseAndCheckDict (   self,
  expr,
  test_string,
  expected_dict,
  msg = None,
  verbose = True 
)
Convenience wrapper assert to test a parser element and input string, and assert that
the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``.

◆ assertParseAndCheckList()

pip._vendor.pyparsing.testing.pyparsing_test.TestParseResultsAsserts.assertParseAndCheckList (   self,
  expr,
  test_string,
  expected_list,
  msg = None,
  verbose = True 
)
Convenience wrapper assert to test a parser element and input string, and assert that
the resulting ``ParseResults.asList()`` is equal to the ``expected_list``.

◆ assertParseResultsEquals()

pip._vendor.pyparsing.testing.pyparsing_test.TestParseResultsAsserts.assertParseResultsEquals (   self,
  result,
  expected_list = None,
  expected_dict = None,
  msg = None 
)
Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``,
and compare any defined results names with an optional ``expected_dict``.

◆ assertRunTestResults()

pip._vendor.pyparsing.testing.pyparsing_test.TestParseResultsAsserts.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)]

The documentation for this class was generated from the following file: