diff --git a/run_unittests.py b/run_unittests.py index 80833425ff81..0bd6d4bf9c61 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3769,7 +3769,7 @@ def test_templates(self): env = get_fake_env() for l in ['cpp', 'cs', 'd', 'java', 'cuda', 'fortran', 'objc', 'objcpp', 'rust']: try: - comp = getattr(env, f'detect_{l}_compiler')(MachineChoice.HOST) + comp = env.detect_compiler_for(l, MachineChoice.HOST) with tempfile.TemporaryDirectory() as d: comp.sanity_check(d, env) langs.append(l)