Class: QgsTestUtils

Static Methods

compareDomElements

Compares two DOM elements and returns True if they are equivalent.

sanitizeFakeHttpEndpoint

Sanitizes fake_qgis_http_endpoint URLs

testProviderIteratorThreadSafety

Runs a thready safety test on iterators from a vector data provider, by concurrently requesting features from the provider.

class qgis.core.QgsTestUtils[source]
class qgis.core.QgsTestUtils(a0: QgsTestUtils)

Bases: object

static compareDomElements(element1: QDomElement, element2: QDomElement) bool[source]

Compares two DOM elements and returns True if they are equivalent.

Dumps useful diff information to the console if the elements differ.

Parameters:
  • element1 (QDomElement)

  • element2 (QDomElement)

Return type:

bool

static sanitizeFakeHttpEndpoint(urlString: str | None) str[source]

Sanitizes fake_qgis_http_endpoint URLs

Parameters:

urlString (Optional[str])

Return type:

str

static testProviderIteratorThreadSafety(provider: QgsVectorDataProvider | None, request: QgsFeatureRequest = QgsFeatureRequest()) bool[source]

Runs a thready safety test on iterators from a vector data provider, by concurrently requesting features from the provider.

This method returns True… or it segfaults.

Parameters:
Return type:

bool