Beispiel #1
0
 def test_lists_in_dicts(self):
     lhs = {'a': 'A', 'b': ['B', 'c', 'C']}
     rhs = {'b': ['c', 'C', 'B'], 'a': 'A'}
     self.assertEqual(deep_ordered(lhs), deep_ordered(rhs))
Beispiel #2
0
 def test_simple_dict(self):
     # not sure if this one is valid because basic dictionary comparison works anyway.
     lhs = {'a': 'A', 'b': 'B', 'c': 'C'}
     rhs = {'c': 'C', 'b': 'B', 'a': 'A'}
     self.assertEqual(deep_ordered(lhs), deep_ordered(rhs))
Beispiel #3
0
 def test_nested_lists(self):
     lhs = ['a', ['b', 'c']]
     rhs = [['c', 'b'], 'a']
     self.assertEqual(deep_ordered(lhs), deep_ordered(rhs))
Beispiel #4
0
 def test_simple_list(self):
     lhs = ['a', 'b', 'c']
     rhs = ['c', 'b', 'a']
     self.assertEqual(deep_ordered(lhs), deep_ordered(rhs))