| |
- TestCase(object)
-
- SimpleParseGrammarTests
-
- SimpleParseRecursiveTests
class SimpleParseGrammarTests(TestCase) |
|
Test parsing of the the simpleparse grammar elements |
|
- Method resolution order:
- SimpleParseGrammarTests
- TestCase
- object
Methods defined here:
- doBasicTest(self, parserName, testValue, expected)
- testChar1(self)
- testChar2(self)
- testChar3(self)
- testChar4(self)
- testChar5(self)
- testChar6(self)
- testChar7(self)
- testChar8(self)
- testChar85(self)
- testChar9(self)
- testCharNoBrace1(self)
- testCharRange1(self)
- testComment1(self)
- testComment2(self)
- testCutToken2(self)
- testCutToken3(self)
- testCutToken4(self)
- testDeclaration(self)
- testDeclaration2(self)
- testDeclaration3(self)
- testDeclaration4(self)
- testDeclaration5(self)
- testDeclarationSet1(self)
- testDeclarationSet2(self)
- Just tries to parse and sees that everything was parsed, doesn't predict the result
- testElementToken1(self)
- testElementToken2(self)
- testElementToken3(self)
- testElementToken4(self)
- testElementToken5(self)
- testElementToken6(self)
- Lookahead indicator with positive
- testElementToken7(self)
- Lookahead indicator with negative
- testElementToken8(self)
- Error on fail indicator
- testElementToken9(self)
- Error on fail indicator with message
- testErrorOnFailFlag1(self)
- testExpandedName1(self)
- testExpandedName2(self)
- testFOGroup1(self)
- testGroup1(self)
- testGroup2(self)
- testGroup3(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup4(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup5(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup6(self)
- Test group with multiple / 'd values
- testLiteral1(self)
- testLiteral2(self)
- testLiteral3(self)
- testLiteral4(self)
- testLiteral5(self)
- testLiteral6(self)
- testLiteralDecorator(self)
- testLiteralDecorator2(self)
- testLiteralDecorator3(self)
- Decorator must be right next to literal, no whitespace
- testLookAheadIndicator1(self)
- testLookAheadIndicator2(self)
- testName1(self)
- testName2(self)
- testName3(self)
- testNegposIndicator1(self)
- testNegposIndicator2(self)
- testOccurenceIndicator1(self)
- testOccurenceIndicator2(self)
- testOccurenceIndicator3(self)
- testOccurenceIndicator4(self)
- testOccurenceIndicator5(self)
- testRange1(self)
- testRange2(self)
- testRange3(self)
- testRange4(self)
- Test optional repeating children running into eof
Original SimpleParse had a major failure here,
system hung trying to parse the [] string. Basically,
there was no check for EOF during a repeating-item
parse (save for literals and character sets), so you
wound up with infinite loops.
- testRange5(self)
- Test optional repeating children with no termination
Original SimpleParse had a major failure here,
system hung trying to parse the [] string. Basically,
there was no check for EOF during a repeating-item
parse (save for literals and character sets), so you
wound up with infinite loops.
- testSEQGroup1(self)
- testSEQToken1(self)
- testSeqGroup2(self)
- testUnreportedName1(self)
- testUnreportedName2(self)
- testWhitespace1(self)
- testWhitespace2(self)
- testWhitespace3(self)
- testWhitespace4(self)
- testWhitespace5(self)
- Bug in 2.0.0 where Null comments such as:
"#
"
didn't parse.
Methods inherited from TestCase:
- __call__(self, *args, **kwds)
- __init__(self, methodName='runTest')
- Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.
- __repr__(self)
- __str__(self)
- assertAlmostEqual = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertAlmostEquals = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertEqual = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertEquals = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertFalse = failIf(self, expr, msg=None)
- Fail the test if the expression is true.
- assertNotAlmostEqual = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertNotAlmostEquals = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertNotEqual = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertNotEquals = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertRaises = failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- assertTrue = failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- assert_ = failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- countTestCases(self)
- debug(self)
- Run the test without collecting errors in a TestResult
- defaultTestResult(self)
- fail(self, msg=None)
- Fail immediately, with the given message.
- failIf(self, expr, msg=None)
- Fail the test if the expression is true.
- failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- id(self)
- run(self, result=None)
- setUp(self)
- Hook method for setting up the test fixture before exercising it.
- shortDescription(self)
- Returns a one-line description of the test, or None if no
description has been provided.
The default implementation of this method returns the first line of
the specified test method's docstring.
- tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
Data and other attributes inherited from TestCase:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'TestCase' objects>
- list of weak references to the object (if defined)
- failureException = <class exceptions.AssertionError>
- Assertion failed.
|
class SimpleParseRecursiveTests(SimpleParseGrammarTests) |
|
Test parsing of grammar elements with generated version of simpleparse grammar |
|
- Method resolution order:
- SimpleParseRecursiveTests
- SimpleParseGrammarTests
- TestCase
- object
Methods defined here:
- doBasicTest(self, parserName, testValue, expected)
Methods inherited from SimpleParseGrammarTests:
- testChar1(self)
- testChar2(self)
- testChar3(self)
- testChar4(self)
- testChar5(self)
- testChar6(self)
- testChar7(self)
- testChar8(self)
- testChar85(self)
- testChar9(self)
- testCharNoBrace1(self)
- testCharRange1(self)
- testComment1(self)
- testComment2(self)
- testCutToken2(self)
- testCutToken3(self)
- testCutToken4(self)
- testDeclaration(self)
- testDeclaration2(self)
- testDeclaration3(self)
- testDeclaration4(self)
- testDeclaration5(self)
- testDeclarationSet1(self)
- testDeclarationSet2(self)
- Just tries to parse and sees that everything was parsed, doesn't predict the result
- testElementToken1(self)
- testElementToken2(self)
- testElementToken3(self)
- testElementToken4(self)
- testElementToken5(self)
- testElementToken6(self)
- Lookahead indicator with positive
- testElementToken7(self)
- Lookahead indicator with negative
- testElementToken8(self)
- Error on fail indicator
- testElementToken9(self)
- Error on fail indicator with message
- testErrorOnFailFlag1(self)
- testExpandedName1(self)
- testExpandedName2(self)
- testFOGroup1(self)
- testGroup1(self)
- testGroup2(self)
- testGroup3(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup4(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup5(self)
- Test group with sequential added group
Note that this test also serves to test
the function of non-reporting names
- testGroup6(self)
- Test group with multiple / 'd values
- testLiteral1(self)
- testLiteral2(self)
- testLiteral3(self)
- testLiteral4(self)
- testLiteral5(self)
- testLiteral6(self)
- testLiteralDecorator(self)
- testLiteralDecorator2(self)
- testLiteralDecorator3(self)
- Decorator must be right next to literal, no whitespace
- testLookAheadIndicator1(self)
- testLookAheadIndicator2(self)
- testName1(self)
- testName2(self)
- testName3(self)
- testNegposIndicator1(self)
- testNegposIndicator2(self)
- testOccurenceIndicator1(self)
- testOccurenceIndicator2(self)
- testOccurenceIndicator3(self)
- testOccurenceIndicator4(self)
- testOccurenceIndicator5(self)
- testRange1(self)
- testRange2(self)
- testRange3(self)
- testRange4(self)
- Test optional repeating children running into eof
Original SimpleParse had a major failure here,
system hung trying to parse the [] string. Basically,
there was no check for EOF during a repeating-item
parse (save for literals and character sets), so you
wound up with infinite loops.
- testRange5(self)
- Test optional repeating children with no termination
Original SimpleParse had a major failure here,
system hung trying to parse the [] string. Basically,
there was no check for EOF during a repeating-item
parse (save for literals and character sets), so you
wound up with infinite loops.
- testSEQGroup1(self)
- testSEQToken1(self)
- testSeqGroup2(self)
- testUnreportedName1(self)
- testUnreportedName2(self)
- testWhitespace1(self)
- testWhitespace2(self)
- testWhitespace3(self)
- testWhitespace4(self)
- testWhitespace5(self)
- Bug in 2.0.0 where Null comments such as:
"#
"
didn't parse.
Methods inherited from TestCase:
- __call__(self, *args, **kwds)
- __init__(self, methodName='runTest')
- Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.
- __repr__(self)
- __str__(self)
- assertAlmostEqual = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertAlmostEquals = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertEqual = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertEquals = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertFalse = failIf(self, expr, msg=None)
- Fail the test if the expression is true.
- assertNotAlmostEqual = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertNotAlmostEquals = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- assertNotEqual = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertNotEquals = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertRaises = failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- assertTrue = failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- assert_ = failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- countTestCases(self)
- debug(self)
- Run the test without collecting errors in a TestResult
- defaultTestResult(self)
- fail(self, msg=None)
- Fail immediately, with the given message.
- failIf(self, expr, msg=None)
- Fail the test if the expression is true.
- failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
- failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- id(self)
- run(self, result=None)
- setUp(self)
- Hook method for setting up the test fixture before exercising it.
- shortDescription(self)
- Returns a one-line description of the test, or None if no
description has been provided.
The default implementation of this method returns the first line of
the specified test method's docstring.
- tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
Data and other attributes inherited from TestCase:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'TestCase' objects>
- list of weak references to the object (if defined)
- failureException = <class exceptions.AssertionError>
- Assertion failed.
| |