From 020d9ef58a34de2bb6622f3e6e1b7ec3096ebcfb Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:46:11 +0000 Subject: [PATCH] :bug: Fix `test_torch_compile_compatibility` --- tests/test_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 794d7abf0..fe18e0d36 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1860,8 +1860,9 @@ def test_torch_compile_disable() -> None: assert model == compiled_model -def test_torch_compile_compatibility() -> None: +def test_torch_compile_compatibility(caplog: pytest.LogCaptureFixture) -> None: """Test if torch-compile compatibility is checked correctly.""" from tiatoolbox.models.architecture.utils import is_torch_compile_compatible - assert isinstance(is_torch_compile_compatible(), bool) + is_torch_compile_compatible() + assert "torch.compile" in caplog.text