Back to index

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

List of all members.

Public Member Functions

def test1
def test2

Detailed Description

Definition at line 586 of file test_pyexpat.py.


Member Function Documentation

Definition at line 587 of file test_pyexpat.py.

00587 
00588     def test1(self):
00589         xml = "\0\r\n"
00590         parser = expat.ParserCreate()
00591         try:
00592             parser.Parse(xml, True)
00593             self.fail()
00594         except expat.ExpatError as e:
00595             self.assertEqual(str(e), 'unclosed token: line 2, column 0')

Here is the call graph for this function:

Definition at line 596 of file test_pyexpat.py.

00596 
00597     def test2(self):
00598         xml = "<?xml version\xc2\x85='1.0'?>\r\n"
00599         parser = expat.ParserCreate()
00600         try:
00601             parser.Parse(xml, True)
00602             self.fail()
00603         except expat.ExpatError as e:
00604             self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')

Here is the call graph for this function:


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