Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed.
(test_case)
| 237 | |
| 238 | |
| 239 | def require_torch(test_case): |
| 240 | """ |
| 241 | Decorator marking a test that requires PyTorch. These tests are skipped when PyTorch isn't installed. |
| 242 | """ |
| 243 | return unittest.skipUnless(is_torch_available(), "test requires PyTorch")(test_case) |
| 244 | |
| 245 | |
| 246 | def require_torch_2(test_case): |
nothing calls this directly
no test coverage detected