Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed.
(test_case)
| 488 | |
| 489 | |
| 490 | def require_torch(test_case): |
| 491 | """ |
| 492 | Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed. |
| 493 | """ |
| 494 | return pytest.mark.skipif(not is_torch_available(), reason="test requires PyTorch")(test_case) |
| 495 | |
| 496 | |
| 497 | def require_torch_2(test_case): |
nothing calls this directly
no test coverage detected
searching dependent graphs…