- Make model-bakery BuildRequires optional, in SLFO:Main we don't have

python311-django.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=36
This commit is contained in:
2024-10-28 16:48:55 +00:00
committed by Git OBS Bridge
parent c39652200e
commit 0835d7ef03
2 changed files with 18 additions and 2 deletions

View File

@@ -37,7 +37,10 @@ BuildArch: noarch
BuildRequires: %{python_module Faker >= 13.11.0}
BuildRequires: %{python_module factory_boy}
BuildRequires: %{python_module importlib-metadata >= 3.6.0}
# Django package not available on SLFO:Main
%if 0%{suse_version} > 1600
BuildRequires: %{python_module model-bakery >= 1.13.0}
%endif
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
@@ -76,7 +79,14 @@ Features:
%check
# test_entrypoint_injection needs installed module for pytest to use
%pytest -k "not (test_entrypoint_injection or test_it_runs_before_stepwise)"
skiptest="test_entrypoint_injection or test_it_runs_before_stepwise"
# Django package not available on SLFO:Main
%if 0%{suse_version} <= 1600
skiptest+=" or test_model_bakery"
%endif
%pytest -k "not ($skiptest)"
%files %{python_files}
%doc README.rst