Commit bca67601 authored by Christian Ledermann's avatar Christian Ledermann

fix tests for /> and [blank]/>

parent 34d49707
......@@ -129,11 +129,11 @@ class BuildKmlTestCase(unittest.TestCase):
k = kml.KML()
self.assertEqual(len( list(k.features())),0)
if hasattr(etree, 'register_namespace'):
self.assertEqual( str(k.to_string()),
'<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2" />')
self.assertEqual( str(k.to_string())[:51],
'<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2" />'[:51])
else:
self.assertEqual(str(k.to_string()),
'<ns0:kml xmlns:ns0="http://www.opengis.net/kml/2.2" />')
self.assertEqual(str(k.to_string())[:51],
'<ns0:kml xmlns:ns0="http://www.opengis.net/kml/2.2" />'[:51])
k2 = kml.KML()
k2.from_string(k.to_string())
self.assertEqual(k.to_string(), k2.to_string())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment