Example #1
0
 def test_mixed_seq_set(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(['13237', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
         '13237 (64600 65033 65044) 20485 [65000] 41209 196673'.split()))
     self.assertEqual(['13237', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
         '13237 (64600 65044) 20485 29049 [65000,65001] 196821'.split()))
Example #2
0
 def test_private_as_confed_seq(self):
     # from rib.20091016.0000.txt
     self.assertEqual(['13237', '13101', '8495', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
         '13237 (64600) 13101 8495 8495 8495 196624'.split()))
     self.assertEqual(['13237', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
         '13237 (64600 65033 65044) 20485 41209 196673'.split()))
     self.assertEqual(['13237', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
         '13237 (64600 65044) 20485 29049 196821'.split()))
Example #3
0
 def test_private_as_confed_set(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(['13237', '13101', '8495', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
         '13237 [64600] 13101 8495 8495 8495 196624'.split()))
     self.assertEqual(['13237', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
         '13237 [64600,65033,65044] 20485 41209 196673'.split()))
     self.assertEqual(['13237', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
         '13237 [64600,65044] 20485 29049 196821'.split()))
Example #4
0
 def test_mixed_seq_set(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(
         ['13237', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
             '13237 (64600 65033 65044) 20485 [65000] 41209 196673'.split(
             )))
     self.assertEqual(
         ['13237', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
             '13237 (64600 65044) 20485 29049 [65000,65001] 196821'.split(
             )))
Example #5
0
 def test_private_as_confed_seq(self):
     # from rib.20091016.0000.txt
     self.assertEqual(
         ['13237', '13101', '8495', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
             '13237 (64600) 13101 8495 8495 8495 196624'.split()))
     self.assertEqual(
         ['13237', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
             '13237 (64600 65033 65044) 20485 41209 196673'.split()))
     self.assertEqual(['13237', '20485', '29049', '196821'],
                      aspath.remove_private_confed_paths(
                          '13237 (64600 65044) 20485 29049 196821'.split()))
Example #6
0
 def test_non_private_confed_set(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(
         ['13237', '13101', '[3]', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
             '13237 [64600] 13101 [3] 8495 8495 196624'.split()))
     self.assertEqual(
         ['13237', '[64600,3,65044]', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
             '13237 [64600,3,65044] 20485 41209 196673'.split()))
     self.assertEqual(['13237', '[64600,3356]', '20485', '29049', '196821'],
                      aspath.remove_private_confed_paths(
                          '13237 [64600,3356] 20485 29049 196821'.split()))
Example #7
0
 def test_non_private_confed_seq(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(
         ['13237', '13101', '(8495)', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
         '13237 (64600) 13101 (8495) 8495 8495 196624'.split()))
     self.assertEqual(
         ['13237', '(64600', '3', '65044)', '20485', '41209', '196673'], aspath.remove_private_confed_paths(
         '13237 (64600 3 65044) 20485 41209 196673'.split()))
     self.assertEqual(
         ['13237', '(64600', '3356)', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
         '13237 (64600 3356) 20485 29049 196821'.split()))
Example #8
0
 def test_non_private_confed_seq(self):
     # based on test_private_as_confed_seq examples
     self.assertEqual(
         ['13237', '13101', '(8495)', '8495', '8495', '196624'],
         aspath.remove_private_confed_paths(
             '13237 (64600) 13101 (8495) 8495 8495 196624'.split()))
     self.assertEqual(
         ['13237', '(64600', '3', '65044)', '20485', '41209', '196673'],
         aspath.remove_private_confed_paths(
             '13237 (64600 3 65044) 20485 41209 196673'.split()))
     self.assertEqual(
         ['13237', '(64600', '3356)', '20485', '29049', '196821'],
         aspath.remove_private_confed_paths(
             '13237 (64600 3356) 20485 29049 196821'.split()))