def test_deadlines(self): self.ts[0].deadline = 300 self.ts[2].deadline = 11 self.assertTrue(p.is_schedulable(2, self.ts)) self.assertFalse(p.is_schedulable(1, self.ts)) self.ts[1].deadline = 50 self.assertFalse(p.is_schedulable(2, self.ts)) self.assertFalse(p.is_schedulable(1, self.ts)) self.assertTrue(p.has_bounded_tardiness(2, self.ts)) self.assertFalse(p.has_bounded_tardiness(1, self.ts))
def test_bound(self): self.assertTrue(p.is_schedulable(2, self.ts)) self.assertFalse(p.is_schedulable(1, self.ts))