Skip to content

Commit bea1df2

Browse files
DN6sayakpaul
andauthored
Update tests/testing_utils.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
1 parent 635d485 commit bea1df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/testing_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def decorator(test_case):
355355
def require_torch_accelerator(test_case):
356356
"""Decorator marking a test that requires an accelerator backend and PyTorch."""
357357
return pytest.mark.skipif(
358-
not (is_torch_available() and torch_device != "cpu"), reason="test requires accelerator+PyTorch"
358+
torch_device == "cpu", reason="test requires accelerator+PyTorch"
359359
)(test_case)
360360

361361

0 commit comments

Comments
 (0)