MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / decorator

Function decorator

diffusers/src/diffusers/utils/testing_utils.py:258–262  ·  view source on GitHub ↗
(test_case)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

is_torch_availableFunction · 0.85
is_torch_versionFunction · 0.85
is_peft_availableFunction · 0.85

Tested by

no test coverage detected