Пример #1
0
 def test_complex_loops(self):
     # from straightenRV manpage
     self.assertEqual(None, aspath.deloop_as_path([1, 2, 3, 2, 3, 4]))
     self.assertEqual(None, aspath.deloop_as_path([1, 2, 3, 2, 4, 5, 4]))
Пример #2
0
 def test_simple_loops(self):
     # from straightenRV manpage
     self.assertEqual([1, 2, 5], aspath.deloop_as_path([1, 2, 3, 2, 5]))
Пример #3
0
 def test_nonloops(self):
     path = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
     self.assertEqual(path, aspath.deloop_as_path(path))
Пример #4
0
 def test_complex_loops(self):
     # from straightenRV manpage
     self.assertEqual(None, aspath.deloop_as_path([1, 2, 3, 2, 3, 4]))
     self.assertEqual(None, aspath.deloop_as_path([1, 2, 3, 2, 4, 5, 4]))
Пример #5
0
 def test_simple_loops(self):
     # from straightenRV manpage
     self.assertEqual([1, 2, 5], aspath.deloop_as_path([1, 2, 3, 2, 5]))
Пример #6
0
 def test_nonloops(self):
     path = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
     self.assertEqual(path, aspath.deloop_as_path(path))