Skip to content

Commit

Permalink
Fix asan warnings from TestQgsProcessingInPlace
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 20, 2020
1 parent 6f0910e commit fe84b45
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/src/python/test_qgsprocessinginplace.py
Expand Up @@ -232,11 +232,11 @@ def test_QgsVectorLayerUtilsmakeFeaturesCompatible(self):

# Adding Z back
l, f = self._make_compatible_tester('Point (1 1)', 'PointZ')
self.assertEqual(f[0].geometry().get().z(), 0)
self.assertEqual(f[0].geometry().constGet().z(), 0)

# Adding M back
l, f = self._make_compatible_tester('Point (1 1)', 'PointM')
self.assertEqual(f[0].geometry().get().m(), 0)
self.assertEqual(f[0].geometry().constGet().m(), 0)

self._make_compatible_tester('Point m (1 1 3)', 'Point')
self._make_compatible_tester('Point(1 3)', 'MultiPoint')
Expand All @@ -250,14 +250,14 @@ def test_QgsVectorLayerUtilsmakeFeaturesCompatible(self):
# Adding Z back
l, f = self._make_compatible_tester('Polygon ((1 1, 2 2, 3 3, 1 1))', 'PolygonZ')
g = f[0].geometry()
g2 = g.get()
g2 = g.constGet()
for v in g2.vertices():
self.assertEqual(v.z(), 0)

# Adding M back
l, f = self._make_compatible_tester('Polygon ((1 1, 2 2, 3 3, 1 1))', 'PolygonM')
g = f[0].geometry()
g2 = g.get()
g2 = g.constGet()
for v in g2.vertices():
self.assertEqual(v.m(), 0)

Expand All @@ -276,14 +276,14 @@ def test_QgsVectorLayerUtilsmakeFeaturesCompatible(self):
# Adding Z back
l, f = self._make_compatible_tester('LineString (1 1, 2 2, 3 3, 1 1))', 'LineStringZ')
g = f[0].geometry()
g2 = g.get()
g2 = g.constGet()
for v in g2.vertices():
self.assertEqual(v.z(), 0)

# Adding M back
l, f = self._make_compatible_tester('LineString (1 1, 2 2, 3 3, 1 1))', 'LineStringM')
g = f[0].geometry()
g2 = g.get()
g2 = g.constGet()
for v in g2.vertices():
self.assertEqual(v.m(), 0)

Expand Down Expand Up @@ -652,8 +652,8 @@ def test_reprojectlayer(self):
)

g = [f.geometry() for f in new_features][0]
self.assertAlmostEqual(g.get().x(), 1001875.4, 1)
self.assertAlmostEqual(g.get().y(), 5621521.5, 1)
self.assertAlmostEqual(g.constGet().x(), 1001875.4, 1)
self.assertAlmostEqual(g.constGet().y(), 5621521.5, 1)

# Check selected
self.assertEqual(self.vl.selectedFeatureIds(), [1])
Expand Down

0 comments on commit fe84b45

Please sign in to comment.