svir.test package

Submodules

svir.test.qgis_interface module

svir.test.qgis_legend_interface module

svir.test.utilities module

Helper module for gui test suite.

svir.test.utilities.assert_and_emit(signal, assertion, p1, p2, msg)[source]
svir.test.utilities.assert_hash_for_file(hash_string, filename)[source]

Assert that a files hash matches its expected hash. :param filename: :param hash_string:

svir.test.utilities.compare_wkt(a, b, tol=1e-06)[source]

Helper function to compare WKT geometries with given tolerance Taken from QGIS test suite

Parameters:
  • a (str) – Input WKT geometry
  • b (str) – Expected WKT geometry
  • tol (float) – compare tolerance
Returns:

True on success, False on failure

Return type:

bool

svir.test.utilities.get_dock()[source]

Get a dock for testing.

If you call this function from a QGIS Desktop, you will get the real dock, however, you use a fake QGIS interface, it will create a fake dock for you.

Returns:A dock.
Return type:QDockWidget
svir.test.utilities.hash_for_file(filename)[source]

Return an md5 checksum for a file :param filename:

Module contents