From d73c2057525ece01073a34da0c9ba9c355dc42f0 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Mon, 23 Oct 2023 14:48:44 +0200 Subject: [PATCH] [Tests] Fix str vs. int comparison in test_num_threads --- tests/python/unittest/test_runtime_module_based_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/unittest/test_runtime_module_based_interface.py b/tests/python/unittest/test_runtime_module_based_interface.py index 0ed097ddf563..6e62e3f2155c 100644 --- a/tests/python/unittest/test_runtime_module_based_interface.py +++ b/tests/python/unittest/test_runtime_module_based_interface.py @@ -680,9 +680,9 @@ def test_num_threads(): env_threads = os.getenv("TVM_NUM_THREADS") omp_env_threads = os.getenv("OMP_NUM_THREADS") if env_threads is not None: - assert reported == env_threads + assert reported == int(env_threads) elif omp_env_threads is not None: - assert reported == omp_env_threads + assert reported == int(omp_env_threads) else: hardware_threads = os.cpu_count() assert reported == hardware_threads or reported == hardware_threads // 2