Back to index

python3.2  3.2.2
Public Member Functions
test.test_pyexpat.ErrorMessageTest Class Reference

List of all members.

Public Member Functions

def test_codes
def test_expaterror

Detailed Description

Definition at line 605 of file test_pyexpat.py.


Member Function Documentation

Definition at line 606 of file test_pyexpat.py.

00606 
00607     def test_codes(self):
00608         # verify mapping of errors.codes and errors.messages
00609         self.assertEqual(errors.XML_ERROR_SYNTAX,
00610                          errors.messages[errors.codes[errors.XML_ERROR_SYNTAX]])

Here is the call graph for this function:

Definition at line 611 of file test_pyexpat.py.

00611 
00612     def test_expaterror(self):
00613         xml = '<'
00614         parser = expat.ParserCreate()
00615         try:
00616             parser.Parse(xml, True)
00617             self.fail()
00618         except expat.ExpatError as e:
00619             self.assertEqual(e.code,
00620                              errors.codes[errors.XML_ERROR_UNCLOSED_TOKEN])
00621 

Here is the call graph for this function:


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