Skip to content

Commit

Permalink
Tweak test to check that the copy move action only copies once
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 25, 2023
1 parent 0d1e390 commit 98431b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/src/python/test_qgsvectorlayertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ def testCopyMoveFeature(self):
""" Test copy and move features"""
rqst = QgsFeatureRequest()
rqst.setFilterFid(4)
features_count = self.vl.featureCount()
self.vl.startEditing()
(ok, rqst, msg) = self.vltools.copyMoveFeatures(self.vl, rqst, -0.1, 0.2)
self.assertTrue(ok)
self.assertEqual(self.vl.featureCount(), features_count + 1)
for f in self.vl.getFeatures(rqst):
geom = f.geometry()
self.assertAlmostEqual(geom.asPoint().x(), -65.42)
Expand Down

0 comments on commit 98431b3

Please sign in to comment.