GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
2
Releases
1
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
process_podcast
Browse code
Added tests for VideoSegment class (ref #31).
master
1 parent
ed7899e
commit
4c0d05e3e3b981275beeb16a20c5946d33a84ded
Nigel Stanger
authored
on 25 Sep 2018
Patch
Showing
1 changed file
segment/tests/test_video_segment.py
Ignore Space
Show notes
View
segment/tests/test_video_segment.py
0 → 100644
import unittest from segment import VideoSegment from segment.tests import SegmentSharedTestCase class VideoSegmentTestCase(SegmentSharedTestCase): """Test the VideoSegment class.""" EXPECTED_TYPE = "video" EXPECTED_TRIM = "trim" EXPECTED_SETPTS = "setpts" def setUp(self): """Set up for test.""" super().setUp() self.segment = VideoSegment( file=self.EXPECTED_INPUT_FILE, punch_in=self.EXPECTED_PUNCH_IN, punch_out=self.EXPECTED_PUNCH_OUT, input_stream=self.EXPECTED_INPUT_STREAM) self.expected_output_options = [ "-map", "{n}:v".format(n=self.segment.input_stream) ] def test_init(self): """Test segment initialises correctly.""" super().test_init() self.assertEqual(self.segment._temp_frame_file, "") # Tricky to test get_last_frame_number() and generate_frame() # because they use pexpect. # Remove SegmentSharedTestCase from the namespace so we don't run # the shared tests twice. See <https://stackoverflow.com/a/22836015>. del(SegmentSharedTestCase)
Show line notes below