Skip to content

Commit

Permalink
Add a note about version added for new functions in testing module
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 10, 2018
1 parent 191b0d4 commit c3279ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/testing/__init__.py
Expand Up @@ -199,7 +199,9 @@ def assertFilesEqual(self, filepath_expected, filepath_result):
def checkGeometriesEqual(self, geom0, geom1, geom0_id, geom1_id, use_asserts=False, precision=14, topo_equal_check=False): def checkGeometriesEqual(self, geom0, geom1, geom0_id, geom1_id, use_asserts=False, precision=14, topo_equal_check=False):
""" Checks whether two geometries are the same - using either a strict check of coordinates (up to given precision) """ Checks whether two geometries are the same - using either a strict check of coordinates (up to given precision)
or by using topological equality (where e.g. a polygon with clockwise is equal to a polygon with counter-clockwise or by using topological equality (where e.g. a polygon with clockwise is equal to a polygon with counter-clockwise
order of vertices) """ order of vertices)
.. versionadded:: 3.2
"""
if not geom0.isNull() and not geom1.isNull(): if not geom0.isNull() and not geom1.isNull():
if topo_equal_check: if topo_equal_check:
equal = geom0.isGeosEqual(geom1) equal = geom0.isGeosEqual(geom1)
Expand All @@ -225,7 +227,9 @@ def checkGeometriesEqual(self, geom0, geom1, geom0_id, geom1_id, use_asserts=Fal
return equal return equal


def checkAttributesEqual(self, feat0, feat1, fields_expected, use_asserts, compare): def checkAttributesEqual(self, feat0, feat1, fields_expected, use_asserts, compare):
""" Checks whether attributes of two features are the same """ """ Checks whether attributes of two features are the same
.. versionadded:: 3.2
"""


for attr_expected, field_expected in zip(feat0.attributes(), fields_expected.toList()): for attr_expected, field_expected in zip(feat0.attributes(), fields_expected.toList()):
try: try:
Expand Down

0 comments on commit c3279ee

Please sign in to comment.