Skip to content

Commit

Permalink
Complete tests utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Mar 26, 2021
1 parent 32f51ef commit c163e43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/planar_tests/test_segments_intersections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from bentley_ottmann.planar import segments_intersections
from tests.utils import (is_point,
reverse_point_coordinates,
reverse_segments_coordinates,
segments_pair_intersections)
from . import strategies

Expand Down
5 changes: 5 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def reverse_segment_coordinates(segment: Segment) -> Segment:
reverse_point_coordinates(segment.end))


def reverse_segments_coordinates(segments: Sequence[Segment]
) -> Sequence[Segment]:
return [reverse_segment_coordinates(segment) for segment in segments]


def reverse_point_coordinates(point: Point) -> Point:
return Point(point.y, point.x)

Expand Down

0 comments on commit c163e43

Please sign in to comment.