18
18
import os
19
19
import uuid
20
20
21
- import beta_snippets
22
21
from google .cloud import storage
23
22
import pytest
24
- from flaky import flaky
25
23
24
+ import beta_snippets
26
25
27
26
POSSIBLE_TEXTS = [
28
27
"Google" ,
@@ -114,7 +113,7 @@ def test_annotation_to_storage_streaming(capsys, video_path, bucket):
114
113
115
114
116
115
# Flaky timeout
117
- @flaky (max_runs = 3 , min_passes = 1 )
116
+ @pytest . mark . flaky (max_runs = 3 , min_passes = 1 )
118
117
def test_detect_text (capsys ):
119
118
in_file = "./resources/googlework_tiny.mp4"
120
119
beta_snippets .video_detect_text (in_file )
@@ -123,15 +122,15 @@ def test_detect_text(capsys):
123
122
124
123
125
124
# Flaky timeout
126
- @flaky (max_runs = 3 , min_passes = 1 )
125
+ @pytest . mark . flaky (max_runs = 3 , min_passes = 1 )
127
126
def test_detect_text_gcs (capsys ):
128
127
in_file = "gs://python-docs-samples-tests/video/googlework_tiny.mp4"
129
128
beta_snippets .video_detect_text_gcs (in_file )
130
129
out , _ = capsys .readouterr ()
131
130
assert 'Text' in out
132
131
133
-
134
- @pytest .mark .slow
132
+ # Flaky InvalidArgument
133
+ @pytest .mark .flaky ( max_runs = 3 , min_passes = 1 )
135
134
def test_track_objects (capsys ):
136
135
in_file = "./resources/googlework_tiny.mp4"
137
136
beta_snippets .track_objects (in_file )
@@ -154,7 +153,7 @@ def test_track_objects_gcs():
154
153
155
154
156
155
# Flaky Gateway
157
- @flaky (max_runs = 3 , min_passes = 1 )
156
+ @pytest . mark . flaky (max_runs = 3 , min_passes = 1 )
158
157
def test_streaming_automl_classification (capsys , video_path ):
159
158
project_id = os .environ ["GCLOUD_PROJECT" ]
160
159
model_id = "VCN6363999689846554624"
0 commit comments