Skip to content

Reference

ShapelyPointDiffer

Bases: BaseOperator

Custom DeepDiff operator for comparing Shapely Point objects and reporting their differences in coordinates.

give_up_diffing(level, diff_instance)

Compares two Shapely Point objects and reports differences in their coordinates.

Parameters:

Name Type Description Default
level DiffLevel

The comparison level containing the two Point objects to compare.

required
diff_instance DeepDiff

The instance of DeepDiff used to report the differences.

required

Returns:

Name Type Description
bool bool

True if the comparison is completed and differences are reported.

ShapelyLineDiffer

Bases: BaseOperator

Deepdiff custom Shapely LineString differ.

give_up_diffing(level, diff_instance)

Compare two Shapely LineString objects and report differences.

Parameters:

Name Type Description Default
level DiffLevel

The current comparison level with t1 and t2 representing LineString objects.

required
diff_instance DeepDiff

DeepDiff instance to report the differences.

required

Returns:

Name Type Description
bool bool

Always returns True after diffing and reporting the result.

UUIDListOperator

Bases: BaseOperator

Custom DeepDiff operator for comparing lists of UUIDs.

__init__(regex_paths)

Initialize UUIDListOperator with regex paths to match UUIDs.

Parameters:

Name Type Description Default
regex_paths list[str]

List of regex paths to identify UUID fields.

required

give_up_diffing(level, diff_instance)

Compare two UUID lists and report differences in added, removed, and unchanged UUIDs.

Parameters:

Name Type Description Default
level Any

The comparison level containing the two objects to compare.

required
diff_instance Any

The instance of DeepDiff that reports the differences.

required

Returns:

Name Type Description
bool bool

True if a difference was found and reported.