Class: QgsRasterChecker

A helper class for unit tests that need to write an image and compare it to an expected result or render time.

class qgis.core.QgsRasterChecker[source]

Bases: object

report(self) str[source]
Return type:

str

runTest(self, verifiedKey: str | None, verifiedUri: str | None, expectedKey: str | None, expectedUri: str | None) bool[source]

Test using renderer to generate the image to be compared.

Parameters:
  • verifiedKey (Optional[str]) – verified provider key

  • verifiedUri (Optional[str]) – URI of the raster to be verified

  • expectedKey (Optional[str]) – expected provider key

  • expectedUri (Optional[str]) – URI of the expected (control) raster

Return type:

bool