File: test_utils.py

package info (click to toggle)
python-xml 0.4.19981014-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,124 kB
  • ctags: 3,099
  • sloc: ansic: 9,075; python: 8,150; xml: 7,940; makefile: 84; sh: 41
file content (12 lines) | stat: -rw-r--r-- 354 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# Test the modules in the utils/ subpackage

from xml.utils import *

print 'Testing utils.escape'
print 'These pairs of strings should all be identical'

print escape('&<>'), '&amp;&lt;&gt;'
print escape('foo&amp;bar'), 'foo&amp;amp;bar'
print escape('< test > &', {'test': '&myentity;'}), '&lt; &myentity; &gt; &amp;'

# XXX add test suite for is-8601