[Python-modules-commits] [cherrypy3] 03/08: Configure pytest by default with optional nose

Carl Suster arcresu-guest at moszumanska.debian.org
Fri Jan 6 08:52:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch master
in repository cherrypy3.

commit 2c56c67175c0531b370c5144716ccf2a6474be5e
Author: Carl Suster <carl at contraflo.ws>
Date:   Fri Jan 6 19:39:37 2017 +1100

    Configure pytest by default with optional nose
    
    Upstream recommended running the test suite as `nosetests -s` but
    currently they seem to support multiple test systems.
---
 debian/changelog |  4 ++--
 debian/rules     | 16 +++++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ac542b6..b489b39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,7 +10,7 @@ cherrypy3 (8.7.0-1) UNRELEASED; urgency=medium
     - 00_supress_profiler_warning.diff: delete since profiler is included
       in Debian python packages now (Closes: #460616).
     - 01_cherryd_location_fix.diff: delete since this is instead handled with
-      a pybuild variable in d/rules.
+      the test suite configuration in d/rules.
     - 02_issue_1328.diff, 03_issue_1199.diff, 04_issue_1315.diff:
       delete since these issues have now been fixed upstream.
     - Add 0001-disable-sphinx-rst.linker-extension.patch to work around a
@@ -54,7 +54,7 @@ cherrypy3 (8.7.0-1) UNRELEASED; urgency=medium
   * Remove broken tutorial link from d/python-cherrypy3.install
     (Closes: #781349).
   * Remove outdated d/NEWS.
-  * Enable test suite and don't install it.
+  * Enable test suite using pybuild (or nosetests) and don't install it.
   * Install tutorial as documentation with d/python-cherrypy3-doc.docs.
 
  -- Carl Suster <carl at contraflo.ws>  Tue, 03 Jan 2017 17:05:43 +1100
diff --git a/debian/rules b/debian/rules
index 8a212ee..d8ee007 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,7 @@
 
 export PYBUILD_NAME=cherrypy3
 
-# export PYBUILD_DISABLE=test
-export PYBUILD_BEFORE_TEST=cp cherrypy/cherryd {build_dir}/cherrypy
-export PYBUILD_TEST_ARGS=cherrypy/test cherrypy/wsgiserver
+export PYBUILD_TEST_ARGS=cherrypy/test cherrypy/wsgiserver -l
 
 include /usr/share/dpkg/default.mk
 
@@ -19,6 +17,18 @@ override_dh_auto_build:
 	PYTHONPATH=. help2man -n cherryd3 -s 1 -o debian/cherryd3.1 --version-string=$(DEB_VERSION_UPSTREAM) ./cherrypy/cherryd
 	dh_auto_build
 
+# Upstream recommends nosetests -s, but also supports pytest. To use nosetests
+# uncomment the below override and comment out the PYBUILD_TEST_ARGS above.
+# override_dh_auto_test:
+# 	PYBUILD_DISABLE_python3=test \
+# 	PYBUILD_SYSTEM=custom \
+# 	PYBUILD_TEST_ARGS="nosetests -s" \
+# 	  dh_auto_test --buildsystem=pybuild
+# 	PYBUILD_DISABLE_python2=test \
+# 	PYBUILD_SYSTEM=custom \
+# 	PYBUILD_TEST_ARGS="nosetests3 -s" \
+# 	  dh_auto_test --buildsystem=pybuild
+
 override_dh_install:
 	find debian/python*-cherrypy3/ -name LICENSE.md -exec rm {} \;
 	dh_install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cherrypy3.git



More information about the Python-modules-commits mailing list