[projects/template-specs] - use explicit PYTEST_PLUGINS lists for reliable tests (not failing if some conflicting plugin is in

qboosh qboosh at pld-linux.org
Thu Dec 16 18:29:39 CET 2021


commit 7302396e1168692fa9c276582f0e73d23b8a775b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 16 18:30:10 2021 +0100

    - 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
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/7302396e1168692fa9c276582f0e73d23b8a775b



More information about the pld-cvs-commit mailing list