Skip to content

Commit ac3e13a

Browse files
committed
Test fix
1 parent 305f87d commit ac3e13a

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

src/superannotate/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import os
22
import sys
33

4-
5-
6-
__version__ = "4.4.7dev2"
7-
4+
__version__ = "4.4.7dev3"
85

96
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
107

src/superannotate/lib/app/analytics/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def aggregate_image_annotations_as_df(
9999
class_name_to_color[name] = color
100100
class_group_name_to_values[name] = {}
101101
for attribute_group in annotation_class["attribute_groups"]:
102-
if attribute_group["group_type"] in ["text", "numeric"]:
102+
group_type = attribute_group.get("group_type")
103+
if group_type and group_type in ["text", "numeric"]:
103104
freestyle_attributes.add(attribute_group["name"])
104105
class_group_name_to_values[name][attribute_group["name"]] = []
105106
for attribute in attribute_group["attributes"]:

tests/integration/annotations/video/test_get_annotations_per_frame.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import math
33
import os
44
from os.path import dirname
5-
from pathlib import Path
65

76
from src.superannotate import SAClient
87
from tests.integration.base import BaseTestCase
@@ -24,7 +23,7 @@ class TestGetAnnotations(BaseTestCase):
2423

2524
@property
2625
def csv_path(self):
27-
return os.path.join(dirname(dirname(dirname(__file__))), self.PATH_TO_URLS)
26+
return os.path.join(DATA_SET_PATH, self.PATH_TO_URLS)
2827

2928
@property
3029
def classes_path(self):

tests/integration/classes/test_create_annotation_class.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,6 @@ def test_create_annotation_class(self):
146146
msg = str(e)
147147
self.assertEqual(msg, "Predefined tagging functionality is not supported for projects of type Video.")
148148

149-
def test_create_supported_annotation_class(self):
150-
msg = ""
151-
try:
152-
sa.create_annotation_class(
153-
self.PROJECT_NAME, "test_add", "#FF0000",
154-
attribute_groups=[
155-
{
156-
"group_type": "text",
157-
"name": "name",
158-
}
159-
]
160-
)
161-
except Exception as e:
162-
msg = str(e)
163-
self.assertEqual(msg, "This project type doesn't support the attribute group types 'text' and 'numeric'.")
164149

165150
def test_create_radio_annotation_class_attr_required(self):
166151
msg = ""

0 commit comments

Comments
 (0)