18
18
19
19
import analyze
20
20
21
- POSSIBLE_TEXTS = ['Google' , 'SUR' , 'SUR' , 'ROTO' , 'Vice President' , '58oo9' ,
22
- 'LONDRES' , 'OMAR' , 'PARIS' , 'METRO' , 'RUE' , 'CARLO' ]
21
+ POSSIBLE_TEXTS = [
22
+ "Google" ,
23
+ "SUR" ,
24
+ "SUR" ,
25
+ "ROTO" ,
26
+ "Vice President" ,
27
+ "58oo9" ,
28
+ "LONDRES" ,
29
+ "OMAR" ,
30
+ "PARIS" ,
31
+ "METRO" ,
32
+ "RUE" ,
33
+ "CARLO" ,
34
+ ]
23
35
24
36
25
37
@pytest .mark .slow
26
38
def test_analyze_shots (capsys ):
27
- analyze .analyze_shots (' gs://cloud-samples-data/video/gbikes_dinosaur.mp4' )
39
+ analyze .analyze_shots (" gs://cloud-samples-data/video/gbikes_dinosaur.mp4" )
28
40
out , _ = capsys .readouterr ()
29
- assert ' Shot 1:' in out
41
+ assert " Shot 1:" in out
30
42
31
43
32
44
@pytest .mark .slow
33
45
def test_analyze_labels (capsys ):
34
- analyze .analyze_labels (' gs://cloud-samples-data/video/cat.mp4' )
46
+ analyze .analyze_labels (" gs://cloud-samples-data/video/cat.mp4" )
35
47
out , _ = capsys .readouterr ()
36
- assert ' label description: cat' in out
48
+ assert " label description: cat" in out
37
49
38
50
39
51
@pytest .mark .slow
40
52
def test_analyze_explicit_content (capsys ):
41
- analyze .analyze_explicit_content (' gs://cloud-samples-data/video/cat.mp4' )
53
+ analyze .analyze_explicit_content (" gs://cloud-samples-data/video/cat.mp4" )
42
54
out , _ = capsys .readouterr ()
43
- assert ' pornography' in out
55
+ assert " pornography" in out
44
56
45
57
46
58
@pytest .mark .slow
47
59
def test_speech_transcription (capsys ):
48
- analyze .speech_transcription (
49
- 'gs://cloud-samples-data/video/googlework_short.mp4' )
60
+ analyze .speech_transcription ("gs://cloud-samples-data/video/googlework_short.mp4" )
50
61
out , _ = capsys .readouterr ()
51
- assert ' cultural' in out
62
+ assert " cultural" in out
52
63
53
64
54
65
@pytest .mark .slow
55
66
def test_detect_text_gcs (capsys ):
56
- analyze .video_detect_text_gcs (
57
- 'gs://cloud-samples-data/video/googlework_tiny.mp4' )
67
+ analyze .video_detect_text_gcs ("gs://cloud-samples-data/video/googlework_tiny.mp4" )
58
68
out , _ = capsys .readouterr ()
59
69
60
70
text_exists = False
@@ -67,7 +77,6 @@ def test_detect_text_gcs(capsys):
67
77
68
78
@pytest .mark .slow
69
79
def test_track_objects_gcs (capsys ):
70
- analyze .track_objects_gcs (
71
- 'gs://cloud-samples-data/video/cat.mp4' )
80
+ analyze .track_objects_gcs ("gs://cloud-samples-data/video/cat.mp4" )
72
81
out , _ = capsys .readouterr ()
73
- assert ' cat' in out
82
+ assert " cat" in out
0 commit comments