File tree Expand file tree Collapse file tree 3 files changed +33
-6
lines changed
tests/integration/subsets Expand file tree Collapse file tree 3 files changed +33
-6
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33
4- __version__ = "4.4.7dev3 "
4+ __version__ = "4.4.7dev4 "
55
66sys .path .append (os .path .split (os .path .realpath (__file__ ))[0 ])
77
Original file line number Diff line number Diff line change 11import copy
2+ import traceback
23from collections import defaultdict
34from concurrent .futures import as_completed
45from concurrent .futures import ThreadPoolExecutor
@@ -942,12 +943,10 @@ def execute(
942943 for future in as_completed (futures ):
943944 try :
944945 ids = future .result ()
945- except Exception as e :
946- continue
947-
948- self .item_ids .extend (ids )
946+ self .item_ids .extend (ids )
947+ except Exception :
948+ logger .debug (traceback .format_exc ())
949949
950- futures = []
951950 subsets = self ._service_provider .subsets .list (self .project ).data
952951 subset = None
953952 for s in subsets :
Original file line number Diff line number Diff line change 1+ from src .superannotate import SAClient
2+
3+ from tests .integration .base import BaseTestCase
4+
5+ sa = SAClient ()
6+
7+
8+ class TestSubSets (BaseTestCase ):
9+ PROJECT_NAME = "Test-TestSubSets"
10+ PROJECT_DESCRIPTION = "Desc"
11+ PROJECT_TYPE = "Vector"
12+ SUBSET_NAME = "SUBSET"
13+
14+ def test_add_items_to_subset (self ):
15+ item_names = [{"name" : f"earth_mov_00{ i } .jpg" , "url" : f"url_{ i } " } for i in range (1 , 6 )]
16+ sa .attach_items (
17+ self .PROJECT_NAME ,
18+ item_names # noqa
19+ )
20+ subset_data = []
21+ for i in item_names :
22+ subset_data .append (
23+ {
24+ "name" : i ['name' ],
25+ "path" : self .PROJECT_NAME
26+ }
27+ )
28+ sa .add_items_to_subset (self .PROJECT_NAME , self .SUBSET_NAME , subset_data )
You can’t perform that action at this time.
0 commit comments