summaryrefslogtreecommitdiffstats
path: root/contrib/python/wcwidth/py3/tests/conftest.py
blob: 2d0a2779dbe6760e9b54ee826589613981b1dbd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Pytest configuration and fixtures."""
# 3rd party
import pytest

try:
    # 3rd party
    from pytest_codspeed import BenchmarkFixture  # noqa: F401  pylint:disable=unused-import
except ImportError:
    # Provide a no-op benchmark fixture when pytest-codspeed is not installed
    @pytest.fixture
    def benchmark():
        """No-op benchmark fixture for environments without pytest-codspeed."""
        def _passthrough(func, *args, **kwargs):
            return func(*args, **kwargs)
        return _passthrough