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