@@ -103,7 +103,7 @@ def invoke_scenedetect(
103103 if config_file :
104104 command += " -c %s" % config_file
105105 command += " " + args .format (** value_dict )
106- return subprocess .call (command .strip ().split (" " ))
106+ return subprocess .call (command .strip ().split (" " ), shell = True )
107107
108108
109109def test_cli_no_args ():
@@ -172,6 +172,7 @@ def test_cli_time_end():
172172 + ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
173173 + test_case .split (),
174174 text = True ,
175+ shell = True ,
175176 )
176177 assert EXPECTED in output , test_case
177178
@@ -200,6 +201,7 @@ def test_cli_time_start():
200201 + ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
201202 + test_case .split (),
202203 text = True ,
204+ shell = True ,
203205 )
204206 assert EXPECTED in output , test_case
205207
@@ -245,6 +247,7 @@ def test_cli_time_scene_boundary():
245247 + ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
246248 + test_case .split (),
247249 text = True ,
250+ shell = True ,
248251 )
249252 assert EXPECTED in output , test_case
250253
@@ -256,6 +259,7 @@ def test_cli_time_end_of_video():
256259 SCENEDETECT_CMD .split (" " )
257260 + ["-i" , DEFAULT_VIDEO_PATH , "detect-content" , "list-scenes" , "-n" , "time" , "-s" , "1872" ],
258261 text = True ,
262+ shell = True ,
259263 )
260264 assert (
261265 """
@@ -408,7 +412,13 @@ def test_cli_split_video_ffmpeg(tmp_path: Path):
408412 " "
409413 )
410414 command .append (DEFAULT_FFMPEG_ARGS )
411- assert subprocess .call (command ) == 0
415+ assert (
416+ subprocess .call (
417+ command ,
418+ shell = True ,
419+ )
420+ == 0
421+ )
412422 entries = sorted (tmp_path .glob (f"{ DEFAULT_VIDEO_NAME } -Scene-*" ))
413423 assert len (entries ) == DEFAULT_NUM_SCENES , entries
414424 [entry .unlink () for entry in entries ]
@@ -424,7 +434,13 @@ def test_cli_split_video_ffmpeg(tmp_path: Path):
424434 [entry .unlink () for entry in entries ]
425435
426436 command += ["-f" , "abc$VIDEO_NAME-123$SCENE_NUMBER" ]
427- assert subprocess .call (command ) == 0
437+ assert (
438+ subprocess .call (
439+ command ,
440+ shell = True ,
441+ )
442+ == 0
443+ )
428444 entries = sorted (tmp_path .glob (f"abc{ DEFAULT_VIDEO_NAME } -123*" ))
429445 assert len (entries ) == DEFAULT_NUM_SCENES , entries
430446 [entry .unlink () for entry in entries ]
@@ -673,6 +689,7 @@ def test_cli_load_scenes_with_time_frames():
673689 "list-scenes" ,
674690 ],
675691 text = True ,
692+ shell = True ,
676693 )
677694 assert (
678695 """
@@ -715,6 +732,7 @@ def test_cli_load_scenes_round_trip():
715732 "400" ,
716733 ],
717734 text = True ,
735+ shell = True ,
718736 )
719737 loaded_first_pass = subprocess .check_output (
720738 SCENEDETECT_CMD .split (" " )
@@ -734,6 +752,7 @@ def test_cli_load_scenes_round_trip():
734752 "testout2.csv" ,
735753 ],
736754 text = True ,
755+ shell = True ,
737756 )
738757 SPLIT_POINT = " | Scene # | Start Frame | Start Time | End Frame | End Time |"
739758 assert ground_truth .split (SPLIT_POINT )[1 ] == loaded_first_pass .split (SPLIT_POINT )[1 ]
0 commit comments