Skip to content

Commit

Permalink
Complete test for 'to_segments_relationship' function
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Jan 31, 2020
1 parent ee001f5 commit 44ba990
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/linear_tests/test_to_segments_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from bentley_ottmann.linear import (Segment,
SegmentsRelationship,
to_segments_relationship)
from tests.utils import reverse_segment
from . import strategies


Expand All @@ -31,3 +32,10 @@ def test_self(segment: Segment) -> None:
result = to_segments_relationship(segment, segment)

assert result is SegmentsRelationship.OVERLAP


@given(strategies.segments)
def test_reversed(segment: Segment) -> None:
result = to_segments_relationship(segment, reverse_segment(segment))

assert result is SegmentsRelationship.OVERLAP

0 comments on commit 44ba990

Please sign in to comment.