From 7302396e1168692fa9c276582f0e73d23b8a775b Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 16 Dec 2021 18:30:10 +0100 Subject: [PATCH 1/1] - use explicit PYTEST_PLUGINS lists for reliable tests (not failing if some conflicting plugin is installed) --- python-ext.spec | 6 ++++++ python.spec | 6 ++++++ python3-ext.spec | 3 +++ python3.spec | 3 +++ 4 files changed, 18 insertions(+) diff --git a/python-ext.spec b/python-ext.spec index 8759254..bcb134d 100644 --- a/python-ext.spec +++ b/python-ext.spec @@ -90,6 +90,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python} -m pytest ... %endif %endif @@ -99,6 +102,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python3} -m pytest ... %endif %endif diff --git a/python.spec b/python.spec index a9994cc..894f485 100644 --- a/python.spec +++ b/python.spec @@ -93,6 +93,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python} -m pytest ... %endif %endif @@ -102,6 +105,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python3} -m pytest ... %endif %endif diff --git a/python3-ext.spec b/python3-ext.spec index 8d6c713..5dfef95 100644 --- a/python3-ext.spec +++ b/python3-ext.spec @@ -66,6 +66,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python3} -m pytest ... %endif diff --git a/python3.spec b/python3.spec index 1132cb8..c4b2439 100644 --- a/python3.spec +++ b/python3.spec @@ -67,6 +67,9 @@ Dokumentacja API modułu Pythona %{module}. # deprecated target, but sometimes still used: %{?with_tests:test} %if %{with tests} +# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty) +PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ +PYTEST_PLUGINS= \ %{__python3} -m pytest tests %endif -- 2.44.0