diff --git a/pytest.spec b/pytest.spec index 0f350c8..f619658 100644 --- a/pytest.spec +++ b/pytest.spec @@ -135,8 +135,9 @@ find %{buildroot}%{python3_sitelib} \ %if %{with tests} %check %global __pytest %{buildroot}%{_bindir}/pytest +# optional_tests deps contain pytest-xdist, so we can use it to run tests faster # test_errors_in_xfail_skip_expressions: https://github.com/pytest-dev/pytest/issues/9413 -%pytest testing %{?with_timeout:--timeout=30} -rs -k "not test_errors_in_xfail_skip_expressions" +%pytest testing %{?with_timeout:--timeout=30} %{?with_optional_tests:-n auto} -rs -k "not test_errors_in_xfail_skip_expressions" %endif