tst: overcome dictionary ordering in doctest (python 3.5)
@@ -305,16 +305,32 @@ def _expand_entities(entities):
Examples
--------
>>> entities = {'subject': ['01', '02'], 'session': ['1', '2'], 'task': ['rest', 'finger']}
- >>> _expand_entities(entities) == [
- ... {'subject': '01', 'session': '1', 'task': 'rest'},
- ... {'subject': '01', 'session': '1', 'task': 'finger'},
- ... {'subject': '01', 'session': '2', 'task': 'rest'},
- ... {'subject': '01', 'session': '2', 'task': 'finger'},
- ... {'subject': '02', 'session': '1', 'task': 'rest'},
- ... {'subject': '02', 'session': '1', 'task': 'finger'},
- ... {'subject': '02', 'session': '2', 'task': 'rest'},
- ... {'subject': '02', 'session': '2', 'task': 'finger'}
- ... ]
+ >>> out = _expand_entities(entities)
+ >>> len(out)
+ 8
+
+ >>> {'subject': '01', 'session': '1', 'task': 'rest'} in out
+ True
+
+ >>> {'subject': '02', 'session': '1', 'task': 'rest'} in out
+ True
+
+ >>> {'subject': '01', 'session': '2', 'task': 'rest'} in out
+ True
+
+ >>> {'subject': '02', 'session': '2', 'task': 'rest'} in out
+ True
+
+ >>> {'subject': '01', 'session': '1', 'task': 'finger'} in out
+ True
+
+ >>> {'subject': '02', 'session': '1', 'task': 'finger'} in out
+ True
+
+ >>> {'subject': '01', 'session': '2', 'task': 'finger'} in out
+ True
+
+ >>> {'subject': '02', 'session': '2', 'task': 'finger'} in out
True
"""
