Skip to content

Commit

Permalink
テストケース追加
Browse files Browse the repository at this point in the history
  • Loading branch information
yncat committed Mar 15, 2024
1 parent 1c3a272 commit 8bf73e0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/domain_test/testFfmpegCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ def test_cutVideoCommand(self):
self.assertEqual(cmd, "ffmpeg -y -i test.mp4 -ss 00:00:00.000 -to 00:00:01.000 -c copy %s" % os.path.join(concatDir, "test_part1.mp4"))
cmd = " ".join(set.nthCommand(2).command)
self.assertEqual(cmd, "ffmpeg -y -i test.mp4 -ss 00:00:02.000 -c copy %s" % os.path.join(concatDir, "test_part2.mp4"))

def test_cutVideoCommand_cuttingFromTop(self):
task = domain.CutVideoTask()
task.nthStep(1)._value = "test.mp4"
task.nthStep(2)._value = [
domain.CutMarker("00:00:00.000", "00:00:02.000"),
]
task.nthStep(3)._value = "test2.mp4"
chain = domain.cutVideoCommand(task)
self.assertEqual(chain.countCommandSets(), 2)
concatDir = os.path.join(os.getcwd(), "temp", "concats")
set = chain.nthCommandSet(1)
self.assertEqual(set.countCommands(), 1)
cmd = " ".join(set.nthCommand(1).command)
self.assertEqual(cmd, "ffmpeg -y -i test.mp4 -ss 00:00:02.000 -c copy %s" % os.path.join(concatDir, "test_part1.mp4"))

0 comments on commit 8bf73e0

Please sign in to comment.