def test_prepended(self): self.assertEqual([1], aspath.deprepend_as_path([1] * 100)) self.assertEqual([1, 2, 3, 4, 5], aspath.deprepend_as_path([1, 1, 2, 3, 3, 4, 5, 5])) self.assertEqual([1, 2, 3, 1, 2, 1], aspath.deprepend_as_path( [1, 1, 2, 3, 3, 1, 1, 1, 2, 1]))
def test_unprepended(self): path = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] self.assertEqual(path, aspath.deprepend_as_path(path))
def test_prepended(self): self.assertEqual([1], aspath.deprepend_as_path([1]*100)) self.assertEqual([1, 2, 3, 4, 5], aspath.deprepend_as_path([1, 1, 2, 3, 3, 4, 5, 5])) self.assertEqual([1, 2, 3, 1, 2, 1], aspath.deprepend_as_path([1, 1, 2, 3, 3, 1, 1, 1, 2, 1]))