Skip to content

Commit 7b9dbaf

Browse files
committed
Fix tests
1 parent 7d8a5bc commit 7b9dbaf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: tests/mask/test_fr_py_objects.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ def case_poly_list(self) -> tuple[int, int, list[list[int]], RleObjs]:
5252
)
5353

5454
@pytest.mark.skip(reason="Original pycocotools implementation is wrong")
55-
def case_poly(self) -> tuple[int, int, list[int], RleObj]:
55+
def case_poly(self) -> tuple[int, int, list[int], RleObjs]:
5656
return (
5757
self.h,
5858
self.w,
5959
[10, 10, 20, 10, 20, 20, 21, 21, 10, 20],
60-
RleObj(size=[self.h, self.w], counts=b"T8:?00000000001O00000:F`2"),
60+
[RleObj(size=[self.h, self.w], counts=b"T8:?00000000001O00000:F`2")],
6161
)
6262

6363
def case_uncompr_list(self) -> tuple[int, int, list[dict], list[dict]]:
@@ -68,12 +68,12 @@ def case_uncompr_list(self) -> tuple[int, int, list[dict], list[dict]]:
6868
[{"size": [self.h, self.w], "counts": b"R45d00000000b;"}],
6969
)
7070

71-
def case_uncompr(self) -> tuple[int, int, dict, dict]:
71+
def case_uncompr(self) -> tuple[int, int, list[dict], RleObjs]:
7272
return (
7373
self.h,
7474
self.w,
75-
{"size": [self.h, self.w], "counts": [130, 5, 20, 5, 20, 5, 20, 5, 20, 5, 390]},
76-
RleObj(size=[self.h, self.w], counts=b"R45d00000000b;"),
75+
[{"size": [self.h, self.w], "counts": [130, 5, 20, 5, 20, 5, 20, 5, 20, 5, 390]}],
76+
[RleObj(size=[self.h, self.w], counts=b"R45d00000000b;")],
7777
)
7878

7979
def case_complex(self):
@@ -195,7 +195,7 @@ def test_frPyObjects(h: int, w: int, obj: PyObj, result) -> None: # noqa: N802
195195
obj_np = obj
196196

197197
# convert the polygon to a mask
198-
mask_np = mask.frPyObjects(obj_np, h, w)
198+
mask_np = mask.frPyObjects(obj_np, h, w) # pyright: ignore[reportCallIssue,reportArgumentType]
199199
mask_pt = tmask.frPyObjects(obj, h, w)
200200

201201
# fix output

0 commit comments

Comments
 (0)