Blame SOURCES/conftest-skipper.py

6656ee
6656ee
class Skipper:
6656ee
    """Skip iso8601 and pretend tests
6656ee
6656ee
    RHEL buildroot doesn't have python-iso8601 and python-pretend. Skip
6656ee
    all tests that use the excluded modules.
6656ee
    """
6656ee
6656ee
    def parse_date(self, datestring):
6656ee
        pytest.skip(f"iso8601 module is not available.")
6656ee
6656ee
    def stub(self, **kwargs):
6656ee
        pytest.skip(f"pretend module is not available.")
6656ee
6656ee
    def raiser(self, exc):
6656ee
        pytest.skip(f"pretend module is not available.")
6656ee
6656ee
6656ee
import sys
6656ee
6656ee
sys.modules["iso8601"] = sys.modules["pretend"] = Skipper()
6656ee