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 strings containing lists of UUIDs.
__init__(regex_paths)
¶
Initialize with paths to match UUID fields.
give_up_diffing(level, diff_instance)
¶
Compare two UUID strings (level.t1 and level.t2) and report: - Order changes (same set of UUIDs, but different order) - Genuine additions or removals of UUIDs.
Returns True if the difference has been reported.