Use pytest-forked to run tests

This commit is contained in:
Maxwell G 2023-07-04 19:53:48 +00:00 committed by Tomáš Hrnčiar
commit 8882033808

View file

@ -19,6 +19,7 @@ Source: %{pypi_source orjson}
Patch: Remove-unstable-simd-feature.patch
BuildRequires: python3-devel
BuildRequires: %{py3_dist pytest-forked}
BuildRequires: rust-packaging
@ -91,7 +92,8 @@ export RUSTFLAGS='%{build_rustflags}'
%check
%pyproject_check_import
%if %{with tests}
%pytest -vv
# --forked: protect the pytest process against test segfaults
%pytest --forked
%endif