def test_generate_subs_decrease_speed_1(self): subs = transcripts_utils.generate_subs(0.5, 1, self.source_subs) self.assertDictEqual( subs, { 'start': [50, 100, 120, 195, 500], 'end': [100, 120, 190, 500, 750], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] })
def test_generate_subs_increase_speed(self): subs = transcripts_utils.generate_subs(2, 1, self.source_subs) self.assertDictEqual( subs, { 'start': [200, 400, 480, 780, 2000], 'end': [400, 480, 760, 2000, 3000], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] })
def test_generate_subs_decrease_speed_2(self): """Test for correct devision during `generate_subs` process.""" subs = transcripts_utils.generate_subs(1, 2, self.source_subs) self.assertDictEqual( subs, { 'start': [50, 100, 120, 195, 500], 'end': [100, 120, 190, 500, 750], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] })
def test_generate_subs_decrease_speed_1(self): subs = transcripts_utils.generate_subs(0.5, 1, self.source_subs) self.assertDictEqual( subs, { 'start': [50, 100, 120, 195, 500], 'end': [100, 120, 190, 500, 750], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] } )
def test_generate_subs_increase_speed(self): subs = transcripts_utils.generate_subs(2, 1, self.source_subs) self.assertDictEqual( subs, { 'start': [200, 400, 480, 780, 2000], 'end': [400, 480, 760, 2000, 3000], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] } )
def test_generate_subs_decrease_speed_2(self): """Test for correct devision during `generate_subs` process.""" subs = transcripts_utils.generate_subs(1, 2, self.source_subs) self.assertDictEqual( subs, { 'start': [50, 100, 120, 195, 500], 'end': [100, 120, 190, 500, 750], 'text': ['subs #1', 'subs #2', 'subs #3', 'subs #4', 'subs #5'] } )