Back to index

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

List of all members.

Public Member Functions

def StartElementHandler
def test

Detailed Description

Definition at line 395 of file test_pyexpat.py.


Member Function Documentation

def test.test_pyexpat.HandlerExceptionTest.StartElementHandler (   self,
  name,
  attrs 
)

Definition at line 396 of file test_pyexpat.py.

00396 
00397     def StartElementHandler(self, name, attrs):
00398         raise RuntimeError(name)

Here is the caller graph for this function:

Definition at line 399 of file test_pyexpat.py.

00399 
00400     def test(self):
00401         parser = expat.ParserCreate()
00402         parser.StartElementHandler = self.StartElementHandler
00403         try:
00404             parser.Parse("<a><b><c/></b></a>", 1)
00405             self.fail()
00406         except RuntimeError as e:
00407             self.assertEqual(e.args[0], 'a',
00408                              "Expected RuntimeError for element 'a', but" + \
00409                              " found %r" % e.args[0])
00410 
00411 
# Test Current* members:

Here is the call graph for this function:

Here is the caller graph for this function:


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