@@ -32,16 +32,16 @@ def thumbnail_generation_with_default_output(tmp_media, inputs, fmt):
3232 ogv_result .close ()
3333
3434
35- def thumbnail_generation_with_with_extras (tmp_media , inputs , fmt ):
35+ def thumbnail_generation_with_with_extras (tmp_media , inputs , fmt , base , snapshot_file ):
3636 generator = Generator (inputs )
37- generator .base = "/media/thumbnails/"
37+ generator .base = base
3838 generator .output = os .path .join (tmp_media , "thumbnails" )
3939 generator .format = fmt
4040 generator .compress = 0.5
4141 generator .interval = 8.2
4242 generator .generate ()
4343
44- snapshot = open (os .path .join (tmp_media , "snapshots" , "specified-base-%s" % fmt ))
44+ snapshot = open (os .path .join (tmp_media , "snapshots" , snapshot_file + fmt ))
4545 result = open (os .path .join (tmp_media , "thumbnails" , "video.%s" % fmt ))
4646
4747 if fmt == "json" :
@@ -64,7 +64,8 @@ def test_api_vtt_generation_file_inputs_default_output(tmp_media):
6464
6565def test_api_vtt_generation_with_extras (tmp_media ):
6666 inputs = (os .path .join (tmp_media , "avi" ), os .path .join (tmp_media , "ogv" ))
67- thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" )
67+ thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" , "" , "specified-empty-base-" )
68+ thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" , "/media/thumbnails/" , "specified-base-" )
6869
6970
7071def test_api_json_generation_directory_inputs_default_output (tmp_media ):
@@ -79,4 +80,5 @@ def test_api_json_generation_file_inputs_default_output(tmp_media):
7980
8081def test_api_json_generation_with_extras (tmp_media ):
8182 inputs = (os .path .join (tmp_media , "avi" ), os .path .join (tmp_media , "ogv" ))
82- thumbnail_generation_with_with_extras (tmp_media , inputs , "json" )
83+ thumbnail_generation_with_with_extras (tmp_media , inputs , "json" , "" , "specified-empty-base-" )
84+ thumbnail_generation_with_with_extras (tmp_media , inputs , "json" , "/media/thumbnails/" , "specified-base-" )
0 commit comments