Files
rk35xx-android14/external/python/markupsafe/tests/conftest.py
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

43 lines
731 B
Python

import pytest
from markupsafe import _native
try:
from markupsafe import _speedups
except ImportError:
_speedups = None
@pytest.fixture(
scope="session",
params=(
_native,
pytest.param(
_speedups,
marks=pytest.mark.skipif(_speedups is None, reason="speedups unavailable"),
),
),
)
def _mod(request):
return request.param
@pytest.fixture(scope="session")
def escape(_mod):
return _mod.escape
@pytest.fixture(scope="session")
def escape_silent(_mod):
return _mod.escape_silent
@pytest.fixture(scope="session")
def soft_str(_mod):
return _mod.soft_str
@pytest.fixture(scope="session")
def soft_unicode(_mod):
return _mod.soft_unicode