[Python-modules-commits] [betamax] 01/02: Use custom pybuild system for testing

Daniele Tricoli eriol-guest at moszumanska.debian.org
Tue Jun 7 03:30:48 UTC 2016


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

eriol-guest pushed a commit to branch master
in repository betamax.

commit eefcbe4ffd76e434cb16c02d9f37d1e75f225479
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Mon Jun 6 17:19:03 2016 +0200

    Use custom pybuild system for testing
    
    This will ensure the package can be backported.
---
 debian/rules | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 3f271c6..e35ba1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@ export PYBUILD_NAME=betamax
 # is broken due unbundling in Debian
 # (see https://github.com/kennethreitz/requests/issues/2870) and remaining
 # tests need Internet connection.
-export PYBUILD_TEST_ARGS=--ignore tests/integration/test_fixtures.py \
+PYTEST_ARGS = --ignore tests/integration/test_fixtures.py \
 	--ignore tests/integration/test_hooks.py \
 	--ignore tests/integration/test_placeholders.py \
 	--ignore tests/integration/test_record_modes.py \
@@ -24,3 +24,10 @@ SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"
 override_dh_auto_build:
 	dh_auto_build
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build $(SPHINXOPTS) -N -bhtml docs docs/build/html
+
+# Tests must be copied manually since Jessie dh-python doesn't copy them.
+# Depending on dh-python >= 2.20151103 is an alternative, but it's not in
+# Jessie yet.
+override_dh_auto_test:
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="cp -r {dir}/tests {build_dir}/tests; cd {build_dir}; {interpreter} -m pytest $(PYTEST_ARGS)" dh_auto_test

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



More information about the Python-modules-commits mailing list