Skip to content

Commit 5fb7be4

Browse files
Narek MkhitaryanNarek Mkhitaryan
authored andcommitted
fix in tests
1 parent 3d50b44 commit 5fb7be4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

tests/integration/annotations/test_annotation_upload_vector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def replace_item(obj, key, replace_value):
6868
origin_annotation = replace_item(json.load(open(annotation_path)), "id", -1)
6969
origin_annotation = replace_item(origin_annotation, "groupId", -1)
7070
annotation = json.load(
71-
open(join(tmp_dir, f"{self.IMAGE_NAME}___objects.json"))
71+
open(join(tmp_dir, f"{self.IMAGE_NAME}.json"))
7272
)
7373
self.assertEqual(
7474
[i["attributes"] for i in annotation["instances"]],
@@ -94,7 +94,7 @@ def test_annotation_folder_upload_download(self):
9494
sa.download_image_annotations(self.PROJECT_NAME, image_name, tmp_dir)
9595
origin_annotation = json.load(open(annotation_path))
9696
annotation = json.load(
97-
open(join(tmp_dir, f"{image_name}___objects.json"))
97+
open(join(tmp_dir, f"{image_name}.json"))
9898
)
9999
self.assertEqual(
100100
len([i["attributes"] for i in annotation["instances"]]),

tests/integration/annotations/test_annotations_pre_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_annotation_last_action_and_creation_type(self):
3333
with tempfile.TemporaryDirectory() as tmp_dir:
3434
sa.download_image_annotations(self.PROJECT_NAME, self.IMAGE_NAME, tmp_dir)
3535
annotation = json.load(
36-
open(join(tmp_dir, f"{self.IMAGE_NAME}___objects.json"))
36+
open(join(tmp_dir, f"{self.IMAGE_NAME}.json"))
3737
)
3838
for instance in annotation["instances"]:
3939
self.assertEqual(instance["creationType"], "Preannotation")
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import os
2-
import pathlib
1+
from pathlib import Path
32

43

5-
DATA_SET_PATH = pathlib.Path(os.getcwd()) / "data_set"
4+
DATA_SET_PATH = Path(__file__).parent / "data_set"
65

76

87
__all__ = ["DATA_SET_PATH"]

0 commit comments

Comments
 (0)