Skip to content

Commit 953f883

Browse files
committed
Fix tests agains meta in JSON
1 parent 0bfa805 commit 953f883

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_annotation_adding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_add_bbox(tmpdir):
9595

9696
num = len(df[df["imageName"] == image_name]["instanceId"].dropna().unique())
9797

98-
assert num == len(annotations) - 2 + 7
98+
assert num == len(annotations) - 3 + 7
9999

100100

101101
def test_add_bbox_noinit(tmpdir):

tests/test_single_annotation_upload_download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def test_annotation_download_upload(
5353
json1 = json.load(open(input_annotation_paths[0]))
5454
json2 = json.load(open(anns_json_in_folder[0]))
5555
for i in json1:
56-
del i["classId"]
56+
i.pop("classId", None)
5757
for i in json2:
58-
del i["classId"]
58+
i.pop("classId", None)
5959
assert json1 == json2
6060
if project_type == "Pixel":
6161
assert filecmp.cmp(

0 commit comments

Comments
 (0)