File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ minversion = 3.7
33log_cli =true
44python_files = test_*.py
55; pytest_plugins = ['pytest_profiling']
6- addopts = -n auto --dist =loadscope
6+ ; addopts = -n auto --dist=loadscope
Original file line number Diff line number Diff line change 66import pytest
77
88from src .superannotate import SAClient
9+ from tests .integration .base import BaseTestCase
910
1011sa = SAClient ()
11- from tests .integration .base import BaseTestCase
1212
1313
1414class TestVectorAnnotationsWithTag (BaseTestCase ):
@@ -44,7 +44,13 @@ def test_vector_annotations_with_tag(self):
4444 self .assertEqual (annotations ['instances' ][0 ]['attributes' ][0 ]['groupName' ], 'g1' )
4545 sa .pin_image (self .PROJECT_NAME , self .EXAMPLE_IMAGE_1 , pin = True )
4646 metadata = sa .get_item_metadata (self .PROJECT_NAME , item_name = self .EXAMPLE_IMAGE_1 )
47- assert metadata ['is_pinned' ] == True
47+ assert metadata ['is_pinned' ] is True
48+
49+ def test_pin_image_negative_name (self ):
50+ sa .attach_items (self .PROJECT_NAME , [{"url" : "some url" , "name" : self .EXAMPLE_IMAGE_1 }])
51+ item = sa .search_items (self .PROJECT_NAME )[0 ]
52+ assert not item ['is_pinned' ]
53+ sa .pin_image (self .PROJECT_NAME , self .EXAMPLE_IMAGE_1 + 'NEW NAME' )
4854
4955
5056class TestVectorAnnotationsWithTagFolderUpload (BaseTestCase ):
You can’t perform that action at this time.
0 commit comments