aboutsummaryrefslogtreecommitdiff
path: root/test/ec/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/ec/utils.py')
-rw-r--r--test/ec/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ec/utils.py b/test/ec/utils.py
index bedfed2..e1812b3 100644
--- a/test/ec/utils.py
+++ b/test/ec/utils.py
@@ -1,3 +1,10 @@
+from itertools import product
+from functools import reduce
+
def slow(func):
func.slow = 1
return func
+
+def cartesian(*items):
+ for cart in product(*items):
+ yield reduce(lambda x, y: x + y, cart) \ No newline at end of file