1818
1919import analyze
2020
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+ ]
2335
2436
2537@pytest .mark .slow
2638def 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" )
2840 out , _ = capsys .readouterr ()
29- assert ' Shot 1:' in out
41+ assert " Shot 1:" in out
3042
3143
3244@pytest .mark .slow
3345def 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" )
3547 out , _ = capsys .readouterr ()
36- assert ' label description: cat' in out
48+ assert " label description: cat" in out
3749
3850
3951@pytest .mark .slow
4052def 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" )
4254 out , _ = capsys .readouterr ()
43- assert ' pornography' in out
55+ assert " pornography" in out
4456
4557
4658@pytest .mark .slow
4759def 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" )
5061 out , _ = capsys .readouterr ()
51- assert ' cultural' in out
62+ assert " cultural" in out
5263
5364
5465@pytest .mark .slow
5566def 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" )
5868 out , _ = capsys .readouterr ()
5969
6070 text_exists = False
@@ -67,7 +77,6 @@ def test_detect_text_gcs(capsys):
6777
6878@pytest .mark .slow
6979def 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" )
7281 out , _ = capsys .readouterr ()
73- assert ' cat' in out
82+ assert " cat" in out
0 commit comments