Skip to content

Commit

Permalink
Complete tests for 'segments_cross_or_overlap' function
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Jan 9, 2021
1 parent 74c89a7 commit bafb3fd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/planar_tests/test_segments_cross_or_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
from ground.base import (Context,
SegmentsRelationship)
Relation)
from hypothesis import given

from bentley_ottmann.planar import segments_cross_or_overlap
Expand Down Expand Up @@ -35,12 +35,11 @@ def test_step(context: Context, segments: List[Segment]) -> None:

assert (next_result
is (result
or any(context.segments_relationship(first_segment.start,
first_segment.end,
segment.start,
segment.end)
in (SegmentsRelationship.CROSS,
SegmentsRelationship.OVERLAP)
or any(context.segments_relation(first_segment.start,
first_segment.end,
segment.start, segment.end)
in (Relation.COMPONENT, Relation.COMPOSITE,
Relation.CROSS, Relation.EQUAL, Relation.OVERLAP)
for segment in rest_segments)))


Expand Down

0 comments on commit bafb3fd

Please sign in to comment.