(test_case)
| 256 | """Decorator marking a test that requires torch with a specific version or greater.""" |
| 257 | |
| 258 | def decorator(test_case): |
| 259 | correct_torch_version = is_torch_available() and is_torch_version(">=", torch_version) |
| 260 | return unittest.skipUnless( |
| 261 | correct_torch_version, f"test requires torch with the version greater than or equal to {torch_version}" |
| 262 | )(test_case) |
| 263 | |
| 264 | return decorator |
| 265 |
nothing calls this directly
no test coverage detected