File tree 4 files changed +6
-35
lines changed
4 files changed +6
-35
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- import os
18
-
19
17
import pytest
20
18
21
19
import analyze
22
20
23
21
24
- BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
25
- LABELS_FILE_PATH = '/video/cat.mp4'
26
- EXPLICIT_CONTENT_FILE_PATH = '/video/cat.mp4'
27
- SHOTS_FILE_PATH = '/video/gbikes_dinosaur.mp4'
28
-
29
-
30
22
@pytest .mark .slow
31
23
def test_analyze_shots (capsys ):
32
- analyze .analyze_shots (
33
- 'gs://{}{}' .format (BUCKET , SHOTS_FILE_PATH ))
24
+ analyze .analyze_shots ('gs://demomaker/gbikes_dinosaur.mp4' )
34
25
out , _ = capsys .readouterr ()
35
26
assert 'Shot 1:' in out
36
27
37
28
38
29
@pytest .mark .slow
39
30
def test_analyze_labels (capsys ):
40
- analyze .analyze_labels (
41
- 'gs://{}{}' .format (BUCKET , LABELS_FILE_PATH ))
31
+ analyze .analyze_labels ('gs://demomaker/cat.mp4' )
42
32
out , _ = capsys .readouterr ()
43
33
assert 'label description: cat' in out
44
34
45
35
46
36
@pytest .mark .slow
47
37
def test_analyze_explicit_content (capsys ):
48
- analyze .analyze_explicit_content (
49
- 'gs://{}{}' .format (BUCKET , EXPLICIT_CONTENT_FILE_PATH ))
38
+ analyze .analyze_explicit_content ('gs://demomaker/cat.mp4' )
50
39
out , _ = capsys .readouterr ()
51
40
assert 'pornography' in out
Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- import os
18
-
19
17
import pytest
20
18
21
19
import beta_snippets
22
20
23
- BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
24
- FILE_PATH = 'video/googlework_short.mp4'
25
-
26
21
27
22
@pytest .mark .slow
28
23
def test_speech_transcription (capsys ):
29
24
beta_snippets .speech_transcription (
30
- 'gs://{}/{}' . format ( BUCKET , FILE_PATH ) )
25
+ 'gs://python-docs-samples-tests/video/googlework_short.mp4' )
31
26
out , _ = capsys .readouterr ()
32
27
assert 'cultural' in out
Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- import os
18
-
19
17
import pytest
20
18
21
19
import labels
22
20
23
21
24
- BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
25
- LABELS_FILE_PATH = '/video/cat.mp4'
26
-
27
-
28
22
@pytest .mark .slow
29
23
def test_feline_video_labels (capsys ):
30
- labels .analyze_labels (
31
- 'gs://{}{}' .format (BUCKET , LABELS_FILE_PATH ))
24
+ labels .analyze_labels ('gs://demomaker/cat.mp4' )
32
25
out , _ = capsys .readouterr ()
33
26
assert 'Video label description: cat' in out
Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- import os
18
-
19
17
import pytest
20
18
21
19
import shotchange
22
20
23
- BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
24
- SHOTS_FILE_PATH = '/video/gbikes_dinosaur.mp4'
25
-
26
21
27
22
@pytest .mark .slow
28
23
def test_shots_dino (capsys ):
29
- shotchange .analyze_shots (
30
- 'gs://{}{}' .format (BUCKET , SHOTS_FILE_PATH ))
24
+ shotchange .analyze_shots ('gs://demomaker/gbikes_dinosaur.mp4' )
31
25
out , _ = capsys .readouterr ()
32
26
assert 'Shot 1:' in out
You can’t perform that action at this time.
0 commit comments