Ejemplo n.º 1
0
 def test_others_in_orders(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 5, 6]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Ejemplo n.º 2
0
 def test_order_keys_with_multidot(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 4, '.', 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Ejemplo n.º 3
0
 def test_simple_order_keys(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, 4, 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 4, 5, 1, 2])
Ejemplo n.º 4
0
 def test_others_in_orders(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 5, 6]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Ejemplo n.º 5
0
 def test_order_keys_with_multidot(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 4, '.', 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Ejemplo n.º 6
0
 def test_simple_order_keys(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, 4, 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 4, 5, 1, 2])