Commit 5d240001 authored by Ian Lee's avatar Ian Lee

Added test for when kml.KML.from_string when the string is not a kml (e.g. xml)

parent e6f81c5a
......@@ -685,6 +685,11 @@ class KmlFromStringTestCase( unittest.TestCase ):
self.assertFalse('maxLines' in k.to_string())
self.assertTrue('Diffrent Snippet' in k.to_string())
def test_from_wrong_string(self):
doc = kml.KML()
with self.assertRaises(TypeError):
doc.from_string('<xml></xml>')
class StyleTestCase( unittest.TestCase ):
......
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