Commit 2206a1bc authored by Christian Ledermann's avatar Christian Ledermann

update tests for new pygeoif features

parent 9a8d5690
...@@ -1098,7 +1098,7 @@ class Placemark(_Feature): ...@@ -1098,7 +1098,7 @@ class Placemark(_Feature):
logger.warn('No geometries found') logger.warn('No geometries found')
logger.debug(u'Problem with element: {}'.format(etree.tostring(element))) logger.debug(u'Problem with element: {}'.format(etree.tostring(element)))
raise ValueError('No geometries found') #raise ValueError('No geometries found')
def etree_element(self): def etree_element(self):
element = super(Placemark, self).etree_element() element = super(Placemark, self).etree_element()
......
...@@ -1957,6 +1957,7 @@ class GetGeometryTestCase(unittest.TestCase): ...@@ -1957,6 +1957,7 @@ class GetGeometryTestCase(unittest.TestCase):
self.assertEqual( self.assertEqual(
g.geometry.__geo_interface__, g.geometry.__geo_interface__,
{'type': 'LineString', {'type': 'LineString',
'bbox': (0.0, 0.0, 1.0, 1.0),
'coordinates': ((0.0, 0.0), (1.0, 1.0))}) 'coordinates': ((0.0, 0.0), (1.0, 1.0))})
def test_linearring(self): def test_linearring(self):
...@@ -1970,6 +1971,7 @@ class GetGeometryTestCase(unittest.TestCase): ...@@ -1970,6 +1971,7 @@ class GetGeometryTestCase(unittest.TestCase):
self.assertEqual( self.assertEqual(
g.geometry.__geo_interface__, { g.geometry.__geo_interface__, {
'type': 'LinearRing', 'type': 'LinearRing',
'bbox': (0.0, 0.0, 1.0, 1.0),
'coordinates': ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 0.0)) 'coordinates': ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 0.0))
}) })
...@@ -1988,6 +1990,7 @@ class GetGeometryTestCase(unittest.TestCase): ...@@ -1988,6 +1990,7 @@ class GetGeometryTestCase(unittest.TestCase):
self.assertEqual( self.assertEqual(
g.geometry.__geo_interface__, { g.geometry.__geo_interface__, {
'type': 'Polygon', 'type': 'Polygon',
'bbox': (0.0, 0.0, 1.0, 1.0),
'coordinates': (( 'coordinates': ((
(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 0.0) (0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 0.0)
), ) ), )
...@@ -2010,6 +2013,7 @@ class GetGeometryTestCase(unittest.TestCase): ...@@ -2010,6 +2013,7 @@ class GetGeometryTestCase(unittest.TestCase):
self.assertEqual( self.assertEqual(
g.geometry.__geo_interface__, { g.geometry.__geo_interface__, {
'type': 'Polygon', 'type': 'Polygon',
'bbox': (-1.0, -1.0, 2.0, 2.0),
'coordinates': ( 'coordinates': (
((-1.0, -1.0), (2.0, -1.0), (2.0, 2.0), ((-1.0, -1.0), (2.0, -1.0), (2.0, 2.0),
(-1.0, -1.0)), ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (-1.0, -1.0)), ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0),
......
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