can be computed using `times()`.
Args:
- **kwargs: keyword arguments of form `option=[possibilities, ...]`.
+ **kwargs: keyword arguments of form `option=[possibilities, ...]`
+ or `option=the_only_possibility`.
Returns:
a list of dictionaries for each combination. Keys in the dictionaries are
key = first[0]
values = first[1]
+ if not isinstance(values, list):
+ values = [values]
return [
OrderedDict(sorted(list(combined.items()) + [(key, v)], key=sort_by_key))
"b": 3
}], combinations.combine(a=[1, 2], b=[2, 3]))
+ def test_combine_single_parameter(self):
+ self.assertEqual([{
+ "a": 1,
+ "b": 2
+ }, {
+ "a": 2,
+ "b": 2
+ }], combinations.combine(a=[1, 2], b=2))
+
def test_add(self):
self.assertEqual(
[{