Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 28, 2017
1 parent 20c07a5 commit 0f6d015
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions tests/src/core/testqgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) );
}
Expand Down Expand Up @@ -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" ) );
}
Expand All @@ -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" ) );
}
Expand All @@ -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 ) );
Expand Down
5 changes: 0 additions & 5 deletions tests/src/python/test_qgsprojectionselectionwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 0f6d015

Please sign in to comment.