simpleparse.tests.test_printers
index
s:\sp\simpleparse\tests\test_printers.py

Test the print-to-python-file module
 
This just uses the simpleparsegrammar declaration, which is
parsed, then linearised, then loaded as a Python module.

 
Modules
            
simpleparse.baseparser
os
simpleparse.parser
simpleparse.printers
simpleparse.simpleparsegrammar
simpleparse.tests.test_grammarparser
simpleparse.tests.test_printers_garbage
unittest
 
Classes
            
simpleparse.baseparser.BaseParser
RParser(simpleparse.tests.test_printers_garbage.Parser, simpleparse.baseparser.BaseParser)
simpleparse.tests.test_printers_garbage.Parser
RParser(simpleparse.tests.test_printers_garbage.Parser, simpleparse.baseparser.BaseParser)
simpleparse.tests.test_grammarparser.SimpleParseGrammarTests(unittest.TestCase)
PrintersTests
 
class PrintersTests(simpleparse.tests.test_grammarparser.SimpleParseGrammarTests)
       
  
Method resolution order:
PrintersTests
simpleparse.tests.test_grammarparser.SimpleParseGrammarTests
unittest.TestCase

Methods defined here:
doBasicTest(self, parserName, testValue, expected)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_printers'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

Methods inherited from simpleparse.tests.test_grammarparser.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 unittest.TestCase:
_TestCase__exc_info = __exc_info(self)
Return a version of sys.exc_info() with the traceback frame
minimised; usually the top level of the traceback frame is not
needed.
__call__(self, result=None)
__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)
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.
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.
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.
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.
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 non-method functions inherited from unittest.TestCase:
failureException = <class exceptions.AssertionError at 0x007618B0>
Assertion failed.
 
class RParser(simpleparse.tests.test_printers_garbage.Parser, simpleparse.baseparser.BaseParser)
       
  
Method resolution order:
RParser
simpleparse.tests.test_printers_garbage.Parser
simpleparse.baseparser.BaseParser

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_printers'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

Methods inherited from simpleparse.tests.test_printers_garbage.Parser:
buildTagger(self, name=None, processor=None)
Build the tag-table for parsing the EBNF for this parser

Methods inherited from simpleparse.baseparser.BaseParser:
buildProcessor(self)
Build default processor object for this parser class
 
The default implementation returns None.  The processor
can either implement the "method source" API (just provides
information about Callouts and the like), or the processor
API and the method-source API.  The processor API merely
requires that the object be callable, and have the signature:
 
        object( (success, children, nextPosition), buffer)
 
(Note: your object can treat the first item as a single tuple
if it likes).
 
See: simpleparse.processor module for details.
parse(self, data, production=None, processor=None, start=0, stop=None)
Parse data with production "production" of this parser
 
data -- data to be parsed, a Python string, for now
production -- optional string specifying a non-default production to use
        for parsing data
processor -- optional pointer to a Processor or MethodSource object for
        use in determining reporting format and/or post-processing the results
        of the parsing pass.  Can be None if neither is desired (default)
start -- starting index for the parsing, default 0
stop -- stoping index for the parsing, default len(data)
resetBeforeParse(self)
Called just before the parser's parse method starts working,
 
Allows you to set up special-purpose structures, such as stacks
or local storage values.  There is no base implementation.  The
base implementation does nothing.

Data and non-method functions inherited from simpleparse.baseparser.BaseParser:
_rootProduction = ''
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
Functions
            
getSuite()
 
Data
             __file__ = r'S:\sp\simpleparse\tests\test_printers.pyc'
__name__ = 'simpleparse.tests.test_printers'
p = <simpleparse.parser.Parser instance at 0x0096A608>
recursiveParser = <simpleparse.tests.test_printers.RParser instance at 0x00975EB0>
testModuleFile = 'test_printers_garbage.py'