Skip to content

Commit

Permalink
Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 8, 2017
1 parent b6e1eea commit 8ef6722
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/python/featuresourcetestbase.py
Expand Up @@ -510,7 +510,7 @@ def testRectAndExpression(self):


def testGetFeaturesDestinationCrs(self): def testGetFeaturesDestinationCrs(self):
request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785')) request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785'))
features = {f['pk']:f for f in self.source.getFeatures(request)} features = {f['pk']: f for f in self.source.getFeatures(request)}
# test that features have been reprojected # test that features have been reprojected
self.assertAlmostEqual(features[1].geometry().geometry().x(), -7829322, -5) self.assertAlmostEqual(features[1].geometry().geometry().x(), -7829322, -5)
self.assertAlmostEqual(features[1].geometry().geometry().y(), 9967753, -5) self.assertAlmostEqual(features[1].geometry().geometry().y(), 9967753, -5)
Expand All @@ -523,10 +523,10 @@ def testGetFeaturesDestinationCrs(self):
self.assertAlmostEqual(features[5].geometry().geometry().y(), 14493008, -5) self.assertAlmostEqual(features[5].geometry().geometry().y(), 14493008, -5)


# when destination crs is set, filter rect should be in destination crs # when destination crs is set, filter rect should be in destination crs
rect = QgsRectangle(-7650000,10500000,-7200000,15000000) rect = QgsRectangle(-7650000, 10500000, -7200000, 15000000)
request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785')).setFilterRect(rect) request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785')).setFilterRect(rect)
features = {f['pk']:f for f in self.source.getFeatures(request)} features = {f['pk']: f for f in self.source.getFeatures(request)}
self.assertEqual(set(features.keys()),{2,4}) self.assertEqual(set(features.keys()), {2, 4})
# test that features have been reprojected # test that features have been reprojected
self.assertAlmostEqual(features[2].geometry().geometry().x(), -7591989, -5) self.assertAlmostEqual(features[2].geometry().geometry().x(), -7591989, -5)
self.assertAlmostEqual(features[2].geometry().geometry().y(), 11334232, -5) self.assertAlmostEqual(features[2].geometry().geometry().y(), 11334232, -5)
Expand Down

0 comments on commit 8ef6722

Please sign in to comment.