Пример #1
0
 def test_mixed(self):
     primary, secondary = _Connector.split(
         [(AF1, 'a'),
          (AF2, 'b'),
          (AF1, 'c'),
          (AF2, 'd')])
     self.assertEqual(primary, [(AF1, 'a'), (AF1, 'c')])
     self.assertEqual(secondary, [(AF2, 'b'), (AF2, 'd')])
Пример #2
0
 def test_one_family(self):
     # These addresses aren't in the right format, but split doesn't care.
     primary, secondary = _Connector.split(
         [(AF1, 'a'),
          (AF1, 'b')])
     self.assertEqual(primary, [(AF1, 'a'),
                                (AF1, 'b')])
     self.assertEqual(secondary, [])
Пример #3
0
 def test_one_family(self):
     # These addresses aren't in the right format, but split doesn't care.
     primary, secondary = _Connector.split(
         [(AF1, 'a'),
          (AF1, 'b')])
     self.assertEqual(primary, [(AF1, 'a'),
                                (AF1, 'b')])
     self.assertEqual(secondary, [])
Пример #4
0
 def test_mixed(self):
     primary, secondary = _Connector.split(
         [(AF1, 'a'),
          (AF2, 'b'),
          (AF1, 'c'),
          (AF2, 'd')])
     self.assertEqual(primary, [(AF1, 'a'), (AF1, 'c')])
     self.assertEqual(secondary, [(AF2, 'b'), (AF2, 'd')])
 def test_mixed(self):
     primary, secondary = _Connector.split(
         [(AF1, "a"), (AF2, "b"), (AF1, "c"), (AF2, "d")]
     )
     self.assertEqual(primary, [(AF1, "a"), (AF1, "c")])
     self.assertEqual(secondary, [(AF2, "b"), (AF2, "d")])
Пример #6
0
 def test_mixed(self):
     primary, secondary = _Connector.split([(AF1, "a"), (AF2, "b"), (AF1, "c"), (AF2, "d")])
     self.assertEqual(primary, [(AF1, "a"), (AF1, "c")])
     self.assertEqual(secondary, [(AF2, "b"), (AF2, "d")])