File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ def create_label():
348348
349349 project .create_label = create_label
350350 project .create_label ()
351- label = wait_for_label_processing (project )
351+ label = wait_for_label_processing (project )[ 0 ]
352352
353353 yield [project , dataset , datarow , label ]
354354
@@ -424,7 +424,6 @@ def func(client, data_row):
424424 timeout_seconds = 60
425425 while True :
426426 data_row = client .get_data_row (data_row_id )
427- print (f"dr { data_row } " )
428427 if data_row .media_attributes :
429428 return data_row
430429 timeout_seconds -= 2
@@ -442,18 +441,17 @@ def wait_for_label_processing():
442441 """
443442 Do not use. Only for testing.
444443
445- Returns Label after waiting for it to finish processing.
444+ Returns project's labels as a list after waiting for them to finish processing.
446445 If `project.labels()` is called before label is fully processed,
447446 it may return an empty set
448447 """
449448
450449 def func (project ):
451450 timeout_seconds = 10
452451 while True :
453- label = project .labels ().get_one ()
454- print (f"LABEL: { label } " )
455- if label is not None :
456- return label
452+ labels = list (project .labels ())
453+ if len (labels ) > 0 :
454+ return labels
457455 timeout_seconds -= 2
458456 if timeout_seconds <= 0 :
459457 raise TimeoutError (
You can’t perform that action at this time.
0 commit comments