示例#1
0
 def test_propagates_last_correct_shift_to_broken_events(self):
     events = [
         FakeEvent(diff=x)
         for x in (0.9, 0.9, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.9)
     ]
     fix_near_borders(events)
     sf = events[2]
     sl = events[-3]
     self.assertEqual([x.linked for x in events],
                      [sf, sf, None, None, None, None, None, sl, sl])
示例#2
0
 def test_returns_array_with_no_broken_events_unchanged(self):
     events = [FakeEvent(diff=x) for x in (0.9, 0.9, 0.9, 1.0, 0.9)]
     fix_near_borders(events)
     self.assertEqual([x.linked for x in events],
                      [None, None, None, None, None])
示例#3
0
文件: main.py 项目: tp7/Sushi
 def test_returns_array_with_no_broken_events_unchanged(self):
     events = [FakeEvent(diff=x) for x in (0.9, 0.9, 0.9, 1.0, 0.9)]
     sushi.fix_near_borders(events)
     self.assertEqual([x.linked for x in events], [None, None, None, None, None])
示例#4
0
文件: main.py 项目: tp7/Sushi
 def test_propagates_last_correct_shift_to_broken_events(self):
     events = [FakeEvent(diff=x) for x in (0.9, 0.9, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.9)]
     sushi.fix_near_borders(events)
     sf = events[2]
     sl = events[-3]
     self.assertEqual([x.linked for x in events], [sf, sf, None, None, None, None, None, sl, sl])