Exemplo n.º 1
0
    def test_it_remove_minutes_and_seconds_to_time(self):
        time = SubtitleTime(self.start_time, self.end_time)
        new_time = time.minus(minutes=1, seconds=10)

        self.assertEquals(to_time("00:01:50,000"), new_time.start_time)
        self.assertEquals(to_time("00:03:50,000"), new_time.end_time)
Exemplo n.º 2
0
    def test_it_stringfy_time_object(self):
        time = SubtitleTime(self.start_time, self.end_time)

        self.assertEquals("00:03:00,000 --> 00:05:00,000", time.to_str())
Exemplo n.º 3
0
    def test_it_add_minutes_and_seconds_to_time(self):
        time = SubtitleTime(self.start_time, self.end_time)
        new_time = time.plus(minutes=2, seconds=30)

        self.assertEquals(to_time("00:05:30,000"), new_time.start_time)
        self.assertEquals(to_time("00:07:30,000"), new_time.end_time)