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): ...@@ -129,11 +129,11 @@ class BuildKmlTestCase(unittest.TestCase):
k = kml.KML() k = kml.KML()
self.assertEqual(len( list(k.features())),0) self.assertEqual(len( list(k.features())),0)
if hasattr(etree, 'register_namespace'): if hasattr(etree, 'register_namespace'):
self.assertEqual( str(k.to_string()), self.assertEqual( str(k.to_string())[:51],
'<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2" />') '<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2" />'[:51])
else: else:
self.assertEqual(str(k.to_string()), self.assertEqual(str(k.to_string())[:51],
'<ns0:kml xmlns:ns0="http://www.opengis.net/kml/2.2" />') '<ns0:kml xmlns:ns0="http://www.opengis.net/kml/2.2" />'[:51])
k2 = kml.KML() k2 = kml.KML()
k2.from_string(k.to_string()) k2.from_string(k.to_string())
self.assertEqual(k.to_string(), k2.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