Преглед изворни кода

test: add TestFfmpegVideoProducer

main
Rob Hallam пре 3 месеци
родитељ
комит
e3b9862bcf
1 измењених фајлова са 28 додато и 0 уклоњено
  1. +28
    -0
      test/test_producers.py

+ 28
- 0
test/test_producers.py Прегледај датотеку

@@ -10,6 +10,34 @@ class MockFeature():
def to_json(self):
return {"interval": self.interval}

class TestFfmpegVideoProducer(unittest.TestCase):
"""Test FfmpegVideoProducer (produces videos using ffmpeg)"""

def test_init_empty(self):
# test with no features -- should raise ValueError
with self.assertRaises(ValueError):
producers.FfmpegVideoProducer(features=None)

def test_init(self):
# test with features
feature = MockFeature(interval="")
features = [feature]
vidprod = producers.FfmpegVideoProducer(features=features)
self.assertEqual(vidprod.features, features)

def test_ffmpeg_feature_to_clip(self):
# TODO
pass

def test_ffmpeg_concat_clips(self):
# TODO
pass

def test_produce(self):
"""Test we can call produce without error"""
# TODO
pass

class TestVisualisationProducer(unittest.TestCase):
"""Test VisualisationProducer (produces matplotlib visualisations)"""



Loading…
Откажи
Сачувај