diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-01 00:43:45 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-01 00:43:45 +0000 |
| commit | 1ca475c19254ebb8e3c453bab8599c19305e45a5 (patch) | |
| tree | c52f44220396ba5f9c6ed1b923cdb03996a421d8 /tests | |
| parent | 2c07fef611dd1d5cd7e83d59d02d5ab52db74e63 (diff) | |
Add test to ensure whitespace at start of XML document is ignored
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/xmlparser_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/xmlparser_tests.py b/tests/xmlparser_tests.py index 90d8d9b..33563dd 100644 --- a/tests/xmlparser_tests.py +++ b/tests/xmlparser_tests.py @@ -59,5 +59,11 @@ def namespace_of_attributes_is_mapped_to_prefix(): assert_equal("Hello!", xml.attributes["x:val"]) +@istest +def whitespace_between_xml_declaration_and_root_tag_is_ignored(): + xml = _parse_xml_string(b'<?xml version="1.0" ?>\n<body/>') + assert_equal("body", xml.name) + + def _parse_xml_string(string, namespace_mapping=None): return parse_xml(io.BytesIO(string), namespace_mapping) |
