[packages/python-fields] - enhanced tests patch for current setuptools/pytest - disable other pytest plugins

qboosh qboosh at pld-linux.org
Tue Mar 15 22:18:30 CET 2022


commit 672788040ec9ae8b96527ba6676f4c8e47c0326e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Mar 15 22:20:36 2022 +0100

    - enhanced tests patch for current setuptools/pytest
    - disable other pytest plugins

 python-fields-tests.patch | 9 +++++++++
 python-fields.spec        | 4 ++++
 2 files changed, 13 insertions(+)
---
diff --git a/python-fields.spec b/python-fields.spec
index e5ac224..415f457 100644
--- a/python-fields.spec
+++ b/python-fields.spec
@@ -106,6 +106,8 @@ Dokumentacja API modułu Pythona fields.
 %py_build
 
 %if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_benchmark.plugin" \
 PYTHONPATH=$(pwd)/src \
 %{__python} -m pytest tests
 %endif
@@ -115,6 +117,8 @@ PYTHONPATH=$(pwd)/src \
 %py3_build
 
 %if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_benchmark.plugin" \
 PYTHONPATH=$(pwd)/src \
 %{__python3} -m pytest tests
 %endif
diff --git a/python-fields-tests.patch b/python-fields-tests.patch
index 6f3b837..dabd49c 100644
--- a/python-fields-tests.patch
+++ b/python-fields-tests.patch
@@ -1,5 +1,14 @@
 --- fields-5.0.0/setup.cfg.orig	2016-04-13 22:51:43.000000000 +0200
 +++ fields-5.0.0/setup.cfg	2018-08-02 05:39:20.335850460 +0200
+@@ -8,7 +8,7 @@
+ max-line-length = 140
+ exclude = tests/*,*/migrations/*,*/south_migrations/*
+ 
+-[pytest]
++[tool:pytest]
+ norecursedirs = 
+ 	.git
+ 	.tox
 @@ -31,7 +31,6 @@
  	--doctest-modules
  	--doctest-glob=\*.rst
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-fields.git/commitdiff/672788040ec9ae8b96527ba6676f4c8e47c0326e



More information about the pld-cvs-commit mailing list