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

 
Modules
            
string
unittest
simpleparse.xml.xml_parser
 
Classes
            
ProductionTest
unittest.TestCase
XMLProductionTests
 
class ProductionTest
       
   Methods defined here:
__call__(self)
Perform the test
__init__(self, production, should, shouldnot)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'simpleparse.tests.test_xml'
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 XMLProductionTests(unittest.TestCase)
      Tests that XML grammar productions match appropriate values
 
   Data and non-method functions defined here:
__doc__ = 'Tests that XML grammar productions match appropriate values'
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_xml'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
testAttDef = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A0B058>
testAttValue = <simpleparse.tests.test_xml.ProductionTest instance at 0x009E2DB8>
testAttlistDecl = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A189E0>
testAttribute = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A0D5F8>
testCharData = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A1DE40>
testComment = <simpleparse.tests.test_xml.ProductionTest instance at 0x00B6B7D8>
testEntityDecl = <simpleparse.tests.test_xml.ProductionTest instance at 0x009B9D60>
testEntityDef = <simpleparse.tests.test_xml.ProductionTest instance at 0x009BD238>
testExternalID = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A6AFE0>
testName = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A1E768>
testPubidLiteral = <simpleparse.tests.test_xml.ProductionTest instance at 0x007B63A0>
testcontent = <simpleparse.tests.test_xml.ProductionTest instance at 0x009CFA20>
testcontentspec = <simpleparse.tests.test_xml.ProductionTest instance at 0x00A18A98>
testelement = <simpleparse.tests.test_xml.ProductionTest instance at 0x009B8FA0>
testelementdecl = <simpleparse.tests.test_xml.ProductionTest instance at 0x009BE010>
testelementdecl_pe = <simpleparse.tests.test_xml.ProductionTest instance at 0x0082E580>
testprolog = <simpleparse.tests.test_xml.ProductionTest instance at 0x00B416F0>

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 0x00761558>
Assertion failed.
 
Functions
            
getSuite()
 
Data
             __file__ = r'S:\sp\simpleparse\tests\test_xml.pyc'
__name__ = 'simpleparse.tests.test_xml'
p = <simpleparse.parser.Parser instance at 0x007DF388>
production = 'prolog'
should = ['<?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd">', '<?xml version="1.0" encoding="UTF-8" ?>\n\t\t\t\t<!DO...eting [\n\t\t\t\t <!ELEMENT greeting (#PCDATA)>\n\t\t\t]>', '<?xml version="1.0" standalone=\'yes\'?>', '<?xml version="1.0" encoding="UTF-8" ?>\n\t\t\t\t<!DO...#REQUIRED\n\t\t\t\t\t\t name CDATA #IMPLIED>\n\t\t\t]>', '<?xml version="1.0" encoding="UTF-8" ?>\n\t\t\t\t<!DO...!-- ... now reference it. -->\n\t\t\t\t%ISOLat2;\n\t\t\t]>']
shouldnot = []
testData = {'AttDef': ([' id ID #REQUIRED', ' name CDATA #IMPLIED', ' type (bullets|ordered|glossary) "ordered"', ' method CDATA #FIXED "POST"'], []), 'AttValue': (['"&this;"'], []), 'AttlistDecl': (['<!ATTLIST termdef\n id ID #REQUIRED\n name CDATA #IMPLIED>', '<!ATTLIST list\n type (bullets|ordered|glossary) "ordered">', '<!ATTLIST form\n method CDATA #FIXED "POST">'], []), 'Attribute': (['s=&this;', 's="&this;"', '&this;'], []), 'CharData': (['Type '], []), 'Comment': (['<!-- testing -->', '<!---->', '<!--- -->', '<!-- -- -- -->', '<!-- - - -->', '<!-- declarations for <head> & <body> -->'], ['<!-- -- -->', '<!-->', '<!-- B+, B, or B--->']), 'EntityDecl': (['<!ENTITY Pub-Status "This is a pre-release of the specification.">', '<!ENTITY open-hatch\n SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">', '<!ENTITY open-hatch\n PUBLIC "-//Textuali...://www.textuality.com/boilerplate/OpenHatch.xml">', '<!ENTITY hatch-pic\n SYSTEM "../grafix/OpenHatch.gif"\n NDATA gif >'], []), 'EntityDef': (['PUBLIC "-//Textuality//TEXT Standard open-hatch ...p://www.textuality.com/boilerplate/OpenHatch.xml"'], []), 'ExternalID': (['SYSTEM "hello.dtd"'], []), 'Name': (['abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-:._', '_a', ':a', ':a'], ['-a', '0', '0.0', '.this']), ...}