Skip to content

Commit 3659265

Browse files
committed
-
1 parent 0a22207 commit 3659265

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source_py3/test_python_toolbox/test_combi/test_exhaustive.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def _check_variation_selection(variation_selection, perm_space_type,
167167

168168
try:
169169
perm_space = perm_space_type(**kwargs)
170-
except combi.UnallowedVariationSelectionException:
170+
except (combi.UnallowedVariationSelectionException, TypeError):
171171
if not variation_selection.is_allowed:
172172
return
173173
else:
@@ -372,7 +372,7 @@ def _check_variation_selection(variation_selection, perm_space_type,
372372

373373
perm_repr = repr(perm)
374374

375-
def shit():
375+
def _iterate_tests():
376376
for variation_selection in combi.variations.variation_selection_space:
377377

378378
kwargs = {}
@@ -458,6 +458,8 @@ def shit():
458458
):
459459
yield (_check_variation_selection,) + product
460460

461-
for i, x in enumerate(shit()):
461+
462+
# We use this shit because Nose can't parallelize generator tests:
463+
for i, x in enumerate(_iterate_tests()):
462464
locals()['f_%s' % i] = lambda: x[0](*x[1:])
463465
exec('def test_%s(): return f_%s()' % (i, i))

0 commit comments

Comments
 (0)