File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1190,7 +1190,7 @@ def prepare_export(
11901190 :param kwargs:
11911191 Arbitrary kwargs::
11921192 * integration_name: can be provided which will be used as a storage to store export file
1193- * format: can be CSV for the Gen AI projects and can be COCO for Vector projects
1193+ * format: can be CSV for the Gen AI projects
11941194
11951195 :return: metadata object of the prepared export
11961196 :rtype: dict
@@ -1224,8 +1224,6 @@ def prepare_export(
12241224 export_type = export_type .lower ()
12251225 if export_type == "csv" :
12261226 _export_type = 3
1227- elif export_type == "coco" :
1228- _export_type = 2
12291227 response = self .controller .prepare_export (
12301228 project_name = project_name ,
12311229 folder_names = folders ,
Original file line number Diff line number Diff line change @@ -1223,7 +1223,7 @@ def execute(self):
12231223 )
12241224 self ._response .data = (uploaded_score_names , skipped_score_names )
12251225 else :
1226- self .reporter .warning_messages ("Empty scores." )
1226+ self .reporter .warning_messages . append ("Empty scores." )
12271227 return self ._response
12281228
12291229
Original file line number Diff line number Diff line change 11import os
22from pathlib import Path
3+ from unittest import mock
34
45from src .superannotate import SAClient
56from tests .integration .base import BaseTestCase
@@ -17,6 +18,11 @@ class TestUploadPriorityScores(BaseTestCase):
1718 def folder_path (self ):
1819 return os .path .join (Path (__file__ ).parent .parent , self .TEST_FOLDER_PATH )
1920
21+ def test_upload_empty_list (self ):
22+ with self .assertLogs ("sa" , level = "INFO" ) as cm :
23+ sa .upload_priority_scores (self .PROJECT_NAME , scores = [])
24+ assert cm .output [0 ] == 'INFO:sa:Uploading priority scores for 0 item(s) to TestUploadPriorityScores.'
25+
2026 def test_upload_priority_scores (self ):
2127
2228 self ._attach_items (count = 4 )
You can’t perform that action at this time.
0 commit comments