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

 
Modules
            
mx.TextTools.TextTools
pprint
simpleparse.tests.test_erroronfail
simpleparse.tests.test_grammarparser
unittest
 
Classes
            
AppendToTagobjMethodSource
BasicMethodSource
unittest.TestCase
CallTests
NameTests
ParserGenerationTests
 
class AppendToTagobjMethodSource
       
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_simpleparsegrammar'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
_m_d = 512
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
 
class BasicMethodSource
       
   Methods defined here:
__init__(self)
_m_a(self, taglist, text, l, r, subtags)
_m_b(self, taglist, text, l, r, subtags)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_simpleparsegrammar'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
_m_c = 2048
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
_m_d = 1024
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
_o_d = 'hello world'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
class CallTests(unittest.TestCase)
      Tests semantics of calling objects from a method source during parsing
 
   Methods defined here:
parse(self, definition, parserName, testValue, source)
test_AppendMatch(self)
Test ability to append the text-string match to the results list
test_AppendTagObj(self)
Test appending the tagobject to the results list
test_AppendToTagObj(self)
Test basic ability to call a method instead of regular functioning
test_basic_call(self)
Test basic ability to call a method instead of regular functioning

Data and non-method functions defined here:
__doc__ = 'Tests semantics of calling objects from a method source during parsing'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'simpleparse.tests.test_simpleparsegrammar'
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 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 NameTests(unittest.TestCase)
       
   Methods defined here:
doBasicTest(self, definition, parserName, testValue, expected)
test_expanded_SingleNameChild(self)
Expanded group with single child which is a Name itself
 
This originally failed when the Name object's report value
was changed to 0 (redundant information for the "expanded" code),
resulting in the child production not getting reported.
test_expanded_name(self)
Non-reporting (expanded) name test
 
Tests new feature, a name whose children
are reported, but which is not itself reported,
basically this lets you create anonymous
groups which can be referenced from other
productions.
test_n(self)
test_n_f(self)
test_no(self)
test_no_f(self)
test_nor(self)
test_nor_f(self)
test_nr(self)
test_nr_f(self)
test_p(self)
test_po(self)
test_por(self)
test_pr(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_simpleparsegrammar'
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 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 ParserGenerationTests(unittest.TestCase)
       
   Methods defined here:
doBasicTest(self, definition, parserName, testValue, expected)
testGenCILiteral1(self)
testGenCILiteral2(self)
testGenCILiteral3(self)
testGenCILiteral4(self)
testGenCILiteral5(self)
testGenCILiteral6(self)
testGenNegLit1(self)
testGenNegRange1(self)
testGenNegRange2(self)
testGenPos1(self)
testGenPos2(self)
testGenPosRept1(self)
testGenPosReptOpt1(self)
testGenPosReptOpt2(self)
testLookahead2(self)
Test lookahead on literals (more complex)
testLookahead3(self)
Test lookahead on reported positive productions
testLookahead4(self)
testLookahead5(self)
testLookahead6(self)
testLookaheadNeg(self)
testLookaheadNeg2(self)
testLookaheadNeg3(self)
testLookaheadNeg4(self)
testLookaheadNeg5(self)
testLookaheadNeg6(self)
testLookaheadPositive(self)
testMultiLineDef(self)
Test multi-line definitions
testOptionalGroupHitEOF(self)
Test optional group hitting an EOF during success run

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_simpleparsegrammar'
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 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.
 
Functions
            
getSuite()
 
Data
             AnyInt = <Any Integer>
NullResult = <Null Children>
__file__ = r'S:\sp\simpleparse\tests\test_simpleparsegrammar.pyc'
__name__ = 'simpleparse.tests.test_simpleparsegrammar'