Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed.
(test_case)
| 199 | |
| 200 | |
| 201 | def require_torch(test_case): |
| 202 | """ |
| 203 | Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed. |
| 204 | """ |
| 205 | return unittest.skipUnless(is_torch_available(), "test requires PyTorch")(test_case) |
| 206 | |
| 207 | |
| 208 | def require_torch_2(test_case): |
nothing calls this directly
no test coverage detected