Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/b/a/babelsubs-HEAD/babelsubs/tests/test_diffing.py   babelsubs(Download)
from unittest2 import TestCase
from babelsubs.storage import SubtitleSet, SubtitleLine, diff, calc_changes
 
class DiffingTest(TestCase):
    def test_empty_subs(self):
         (3000, 4000, "Hey 4"),
        ])
        text_changed, time_changed = calc_changes(set_1, set_2)
        self.assertAlmostEqual(time_changed, 0)
        self.assertAlmostEqual(text_changed, 2/8.0)