lightning/tests/parity_pytorch/__init__.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
274 B
Python
Raw Normal View History

import pytest
2023-05-29 12:05:06 +00:00
from lightning.pytorch.utilities.testing import _runif_reasons
def RunIf(**kwargs):
2023-05-29 12:05:06 +00:00
reasons, marker_kwargs = _runif_reasons(**kwargs)
return pytest.mark.skipif(condition=len(reasons) > 0, reason=f"Requires: [{' + '.join(reasons)}]", **marker_kwargs)