Skip to content

Commit

Permalink
🐛 Fix test_torch_compile_compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneahmed committed Nov 15, 2024
1 parent 8f07b0a commit 020d9ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 020d9ef

Please sign in to comment.