summaryrefslogtreecommitdiffstats
path: root/contrib/python/wcwidth/py3/tests/conftest.py
blob: ecbbdc876e0473537ae545738475443fcae55757 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""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