We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43f8125 commit d5eb7fbCopy full SHA for d5eb7fb
1 file changed
test/test_folding.py
@@ -93,4 +93,11 @@ def test_unfold_path_dict_invalid(self):
93
94
95
def test_fold_path_dict(self):
96
- raise Exception('TODO: test fold_path_dict')
+ test = {'a': {'b': list('cde'), 'f': 'g'}}
97
+ expected_sort_items = (
98
+ ('a.b[0]', 'c'),
99
+ ('a.b[1]', 'd'),
100
+ ('a.b[2]', 'e'),
101
+ ('a.f', 'g'),
102
+ )
103
+ self.assertEqual(tuple(sorted(datapath.folding.fold_path_dict(test).items())), expected_sort_items)
0 commit comments