Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Oct 28, 2024
1 parent e21fa97 commit 71bed6a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tests/test_points.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import numpy as np
import pytest
from shapely.geometry import Point, MultiPoint, LineString, GeometryCollection, MultiLineString
from shapely.geometry import (
Point,
MultiPoint,
LineString,
GeometryCollection,
MultiLineString,
)
from sleap_roots import Series
from sleap_roots.lengths import get_max_length_pts
from sleap_roots.points import (
Expand Down Expand Up @@ -815,9 +821,17 @@ def test_extract_from_empty_geometrycollection():
@pytest.mark.parametrize(
"geometry, expected",
[
(MultiLineString([[(0, 0), (1, 1)], [(2, 2), (3, 3)]]), []),
(GeometryCollection([Point(1, 2), LineString([(0, 0), (1, 1)]), MultiLineString([[(0, 0), (1, 1)], [(2, 2), (3, 3)]])]), [np.array([1, 2]), np.array([0, 0]), np.array([1, 1])]), # GeometryCollection with MultiLineString
(
GeometryCollection(
[
Point(1, 2),
LineString([(0, 0), (1, 1)]),
MultiLineString([[(0, 0), (1, 1)], [(2, 2), (3, 3)]]),
]
),
[np.array([1, 2]), np.array([0, 0]), np.array([1, 1])],
), # GeometryCollection with MultiLineString
(MultiLineString(), []), # Empty MultiLineString
],
)
Expand Down

0 comments on commit 71bed6a

Please sign in to comment.