From 384ed11cf907d1c3b298032e9eea2628f57e1fd9 Mon Sep 17 00:00:00 2001 From: Tai An Date: Wed, 9 Sep 2026 00:10:43 -0700 Subject: [PATCH] Polygraphy: rename the shadowed is_on_gpu test so is_on_cpu is tested tests/util/test_array.py defines test_is_on_cpu twice. The second definition (which asserts util.array.is_on_gpu) rebinds the name, so pytest only ever collects the GPU parametrization and util.array.is_on_cpu has no coverage at all. Signed-off-by: Anai Guo --- tools/Polygraphy/tests/util/test_array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Polygraphy/tests/util/test_array.py b/tools/Polygraphy/tests/util/test_array.py index eaea1ef8d..a7e7811f0 100644 --- a/tools/Polygraphy/tests/util/test_array.py +++ b/tools/Polygraphy/tests/util/test_array.py @@ -96,7 +96,7 @@ def test_is_on_cpu(obj, is_on_cpu): (cuda.DeviceArray(shape=(2, 3), dtype=DataType.FLOAT32), True), ], ) -def test_is_on_cpu(obj, is_on_gpu): +def test_is_on_gpu(obj, is_on_gpu): assert util.array.is_on_gpu(obj) == is_on_gpu