File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
src/superannotate/lib/app/interface Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -3428,6 +3428,8 @@ def upload_image_to_project(
34283428 folder_name = folder_name ,
34293429 image_quality_in_editor = image_quality_in_editor ,
34303430 )
3431+ if upload_response .errors :
3432+ raise AppException (upload_response .errors )
34313433 controller .upload_images (
34323434 project_name = project_name ,
34333435 folder_name = folder_name ,
Original file line number Diff line number Diff line change 55
66import src .superannotate as sa
77from tests .integration .base import BaseTestCase
8+ from src .superannotate import AppException
89
910
1011class TestImageQuality (BaseTestCase ):
@@ -59,3 +60,23 @@ def test_image_quality_setting2(self):
5960 shallow = False ,
6061 )
6162 )
63+
64+
65+
66+ class TestImageQuality (BaseTestCase ):
67+ PROJECT_NAME = "pixel image q"
68+ PROJECT_DESCRIPTION = "Desc"
69+ PROJECT_TYPE = "Pixel"
70+ TEST_FOLDER_PATH = "data_set/big_img"
71+ BIG_IMAGE = "big.jpg"
72+ MESSAGE = "Image resolution 44761088 too large. Max supported for resolution is 4000000"
73+
74+ @property
75+ def folder_path (self ):
76+ return os .path .join (dirname (dirname (__file__ )), self .TEST_FOLDER_PATH )
77+
78+ def test_big_image (self ):
79+ try :
80+ sa .upload_image_to_project (self .PROJECT_NAME ,f"{ self .folder_path } /{ self .BIG_IMAGE } " )
81+ except AppException as e :
82+ self .assertEqual (str (e ),self .MESSAGE )
You can’t perform that action at this time.
0 commit comments