Skip to content
Permalink
Browse files

Fix failing tests

  • Loading branch information
nyalldawson committed Feb 28, 2017
1 parent 20c07a5 commit 0f6d0156bc02030cc1b43b2049edaf9b60d7ae02
Showing with 4 additions and 5 deletions.
  1. +4 −0 tests/src/core/testqgsrasterlayer.cpp
  2. +0 −5 tests/src/python/test_qgsprojectionselectionwidget.py
@@ -359,6 +359,7 @@ void TestQgsRasterLayer::landsatBasic()
QVERIFY2( mpLandsatRasterLayer->isValid(), "landsat.tif layer is not valid!" );
mpLandsatRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, QgsRasterMinMaxOrigin::MinMax );
mMapSettings->setLayers( QList<QgsMapLayer*>() << mpLandsatRasterLayer );
mMapSettings->setDestinationCrs( mpLandsatRasterLayer->crs() );
mMapSettings->setExtent( mpLandsatRasterLayer->extent() );
QVERIFY( render( "landsat_basic" ) );
}
@@ -660,6 +661,7 @@ void TestQgsRasterLayer::transparency()
rasterRenderer->setRasterTransparency( rasterTransparency );

mMapSettings->setLayers( QList<QgsMapLayer*>() << mpFloat32RasterLayer );
mMapSettings->setDestinationCrs( mpFloat32RasterLayer->crs() );
mMapSettings->setExtent( mpFloat32RasterLayer->extent() );
QVERIFY( render( "raster_transparency" ) );
}
@@ -669,6 +671,7 @@ void TestQgsRasterLayer::multiBandColorRenderer()
QgsMultiBandColorRenderer* rasterRenderer = new QgsMultiBandColorRenderer( mPngRasterLayer->dataProvider(), 1, 2, 3 );
mPngRasterLayer->setRenderer( rasterRenderer );
mMapSettings->setLayers( QList<QgsMapLayer*>() << mPngRasterLayer );
mMapSettings->setDestinationCrs( mPngRasterLayer->crs() );
mMapSettings->setExtent( mPngRasterLayer->extent() );
QVERIFY( render( "raster_multibandrenderer" ) );
}
@@ -692,6 +695,7 @@ void TestQgsRasterLayer::regression992()
QSKIP( "This test requires the JPEG2000 GDAL driver", SkipAll );
}

mMapSettings->setDestinationCrs( mGeoJp2RasterLayer->crs() );
mMapSettings->setExtent( mGeoJp2RasterLayer->extent() );
mMapSettings->setLayers( QList<QgsMapLayer*>() << mGeoJp2RasterLayer );
QVERIFY( render( "raster_geojp2", 400 ) );
@@ -47,11 +47,6 @@ def testShowingHiding(self):
QgsProject.instance().setCrs(QgsCoordinateReferenceSystem('EPSG:3113'))
w = QgsProjectionSelectionWidget()
w.setOptionVisible(QgsProjectionSelectionWidget.ProjectCrs, True)
self.assertFalse(w.optionVisible(QgsProjectionSelectionWidget.ProjectCrs))
# should still be hidden, because otf reprojection not active
QgsProject.instance().writeEntry("SpatialRefSys", "/ProjectionsEnabled", 1)
w = QgsProjectionSelectionWidget()
w.setOptionVisible(QgsProjectionSelectionWidget.ProjectCrs, True)
self.assertTrue(w.optionVisible(QgsProjectionSelectionWidget.ProjectCrs))
w.setOptionVisible(QgsProjectionSelectionWidget.ProjectCrs, False)
self.assertFalse(w.optionVisible(QgsProjectionSelectionWidget.ProjectCrs))

0 comments on commit 0f6d015

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