Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | test_pyexpat |
2 | OK. | |
3 | OK. | |
4 | OK. | |
5 | OK. | |
6 | OK. | |
7 | OK. | |
8 | OK. | |
9 | OK. | |
10 | OK. | |
11 | OK. | |
12 | OK. | |
13 | OK. | |
14 | PI: | |
15 | 'xml-stylesheet' 'href="stylesheet.css"' | |
16 | Comment: | |
17 | ' comment data ' | |
18 | Notation declared: ('notation', None, 'notation.jpeg', None) | |
19 | Unparsed entity decl: | |
20 | ('unparsed_entity', None, 'entity.file', None, 'notation') | |
21 | Start element: | |
22 | 'root' {'attr1': 'value1', 'attr2': 'value2\xe1\xbd\x80'} | |
23 | NS decl: | |
24 | 'myns' 'http://www.python.org/namespace' | |
25 | Start element: | |
26 | 'http://www.python.org/namespace!subelement' {} | |
27 | Character data: | |
28 | 'Contents of subelements' | |
29 | End element: | |
30 | 'http://www.python.org/namespace!subelement' | |
31 | End of NS decl: | |
32 | 'myns' | |
33 | Start element: | |
34 | 'sub2' {} | |
35 | Start of CDATA section | |
36 | Character data: | |
37 | 'contents of CDATA section' | |
38 | End of CDATA section | |
39 | End element: | |
40 | 'sub2' | |
41 | External entity ref: (None, 'entity.file', None) | |
42 | End element: | |
43 | 'root' | |
44 | PI: | |
45 | u'xml-stylesheet' u'href="stylesheet.css"' | |
46 | Comment: | |
47 | u' comment data ' | |
48 | Notation declared: (u'notation', None, u'notation.jpeg', None) | |
49 | Unparsed entity decl: | |
50 | (u'unparsed_entity', None, u'entity.file', None, u'notation') | |
51 | Start element: | |
52 | u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'} | |
53 | NS decl: | |
54 | u'myns' u'http://www.python.org/namespace' | |
55 | Start element: | |
56 | u'http://www.python.org/namespace!subelement' {} | |
57 | Character data: | |
58 | u'Contents of subelements' | |
59 | End element: | |
60 | u'http://www.python.org/namespace!subelement' | |
61 | End of NS decl: | |
62 | u'myns' | |
63 | Start element: | |
64 | u'sub2' {} | |
65 | Start of CDATA section | |
66 | Character data: | |
67 | u'contents of CDATA section' | |
68 | End of CDATA section | |
69 | End element: | |
70 | u'sub2' | |
71 | External entity ref: (None, u'entity.file', None) | |
72 | End element: | |
73 | u'root' | |
74 | PI: | |
75 | u'xml-stylesheet' u'href="stylesheet.css"' | |
76 | Comment: | |
77 | u' comment data ' | |
78 | Notation declared: (u'notation', None, u'notation.jpeg', None) | |
79 | Unparsed entity decl: | |
80 | (u'unparsed_entity', None, u'entity.file', None, u'notation') | |
81 | Start element: | |
82 | u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'} | |
83 | NS decl: | |
84 | u'myns' u'http://www.python.org/namespace' | |
85 | Start element: | |
86 | u'http://www.python.org/namespace!subelement' {} | |
87 | Character data: | |
88 | u'Contents of subelements' | |
89 | End element: | |
90 | u'http://www.python.org/namespace!subelement' | |
91 | End of NS decl: | |
92 | u'myns' | |
93 | Start element: | |
94 | u'sub2' {} | |
95 | Start of CDATA section | |
96 | Character data: | |
97 | u'contents of CDATA section' | |
98 | End of CDATA section | |
99 | End element: | |
100 | u'sub2' | |
101 | External entity ref: (None, u'entity.file', None) | |
102 | End element: | |
103 | u'root' | |
104 | ||
105 | Testing constructor for proper handling of namespace_separator values: | |
106 | Legal values tested o.k. | |
107 | Caught expected TypeError: | |
108 | ParserCreate() argument 2 must be string or None, not int | |
109 | Caught expected ValueError: | |
110 | namespace_separator must be at most one character, omitted, or None |