Skip to content
Permalink
Browse files

Some general test improvements

  • Loading branch information
m-kuhn committed Apr 14, 2016
1 parent 7d156e7 commit e3e5487f83618d95b2c58709dcad69d9145f5376
Showing with 4 additions and 12 deletions.
  1. +1 −2 tests/src/python/test_qgsblendmodes.py
  2. +3 −10 tests/src/python/test_qgssinglesymbolrenderer.py
@@ -44,8 +44,7 @@
from qgis.testing.mocked import get_iface

from utilities import unitTestDataPath
# Convenience instances in case you may need them
start_app()

TEST_DATA_DIR = unitTestDataPath()


@@ -37,13 +37,10 @@
QgsFillSymbolV2,
QgsFeatureRequest
)
from qgis.testing import start_app, unittest
from qgis.testing import unittest
from qgis.testing.mocked import get_iface
from utilities import unitTestDataPath

# Convenience instances in case you may need them
# not used in this test
start_app()
TEST_DATA_DIR = unitTestDataPath()


@@ -68,9 +65,6 @@ def setUp(self):
self.mapsettings.setExtent(QgsRectangle(-163, 22, -70, 52))
self.mapsettings.setLayers(rendered_layers)

def tearDown(self):
QgsMapLayerRegistry.instance().removeAllMapLayers()

def testOrderBy(self):
self.renderer.setOrderBy(QgsFeatureRequest.OrderBy([QgsFeatureRequest.OrderByClause('Value', False)]))
self.renderer.setOrderByEnabled(True)
@@ -79,12 +73,11 @@ def testOrderBy(self):
renderchecker = QgsMultiRenderChecker()
renderchecker.setMapSettings(self.mapsettings)
renderchecker.setControlName('expected_singlesymbol_orderby')
result = renderchecker.runTest('singlesymbol_orderby')
assert result
self.assertTrue(renderchecker.runTest('singlesymbol_orderby'))

# disable order by and retest
self.renderer.setOrderByEnabled(False)
result = renderchecker.runTest('single')
self.assertTrue(renderchecker.runTest('single'))


if __name__ == '__main__':

0 comments on commit e3e5487

Please sign in to comment.
You can’t perform that action at this time.