From fcd5a880809e7fa5c9836f6d7f0a393a9c8483a1 Mon Sep 17 00:00:00 2001 From: Ailing Date: Thu, 21 Oct 2021 01:47:48 -0400 Subject: [PATCH] [ci] Fix ti testing with no supported arch. (#3236) `ti test -vr2 -a vulkan` fails with `TypeError: 'NoneType' object is not callable` and this PR fixes it. --- python/taichi/testing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/taichi/testing.py b/python/taichi/testing.py index 80bb3561b4d55..ee7af111eb834 100644 --- a/python/taichi/testing.py +++ b/python/taichi/testing.py @@ -107,12 +107,14 @@ def test(arch=None, exclude=None, require=None, **options): arch = supported_archs else: arch = list(filter(lambda x: x in supported_archs, arch)) - if len(arch) == 0: - return lambda x: print('No supported arch found. Skipping') def decorator(foo): @functools.wraps(foo) def wrapped(*args, **kwargs): + if len(arch) == 0: + print('No supported arch found. Skipping.') + return + arch_params_sets = [arch, *_test_features.values()] arch_params_combinations = list( itertools.product(*arch_params_sets))