[med-svn] [Git][med-team/scanpy][master] add pytest and pytest-cov to let the test running

Robbi Nespu gitlab at salsa.debian.org
Tue Mar 23 20:13:43 GMT 2021



Robbi Nespu  pushed to branch master at Debian Med / scanpy


Commits:
6452c527 by Robbi Nespu at 2021-03-24T04:13:17+08:00
add pytest and pytest-cov to let the test running

- - - - -


2 changed files:

- debian/control
- debian/rules


Changes:

=====================================
debian/control
=====================================
@@ -30,7 +30,9 @@ Build-Depends: debhelper-compat (= 13),
                python3-sinfo,
                python3-setuptools-scm,
                python3-legacy-api-wrap,
-               python3-pytoml
+               python3-pytoml,
+               python3-pytest <!nocheck>,
+               python3-pytest-cov <!nocheck>
 Standards-Version: 4.5.1
 Homepage: https://github.com/theislab/scanpy
 Vcs-Browser: https://salsa.debian.org/med-team/scanpy


=====================================
debian/rules
=====================================
@@ -3,14 +3,22 @@
 export DH_VERBOSE = 1
 
 export PYBUILD_NAME=scanpy
-export PYBUILD_BEFORE_TEST=cp -av pyproject.toml {build_dir}; cp -av $(PYBUILD_NAME)/tests {build_dir}/$(PYBUILD_NAME)
-export PYBUILD_AFTER_TEST=rm -rf {build_dir}/pyproject.toml {build_dir}/$(PYBUILD_NAME)/tests
+
+export PYBUILD_TEST_ARGS=-v
+#export PYBUILD_BEFORE_TEST=cp -av pyproject.toml {build_dir}; cp -a $(PYBUILD_NAME)/tests {build_dir}/$(PYBUILD_NAME)
+#export PYBUILD_AFTER_TEST=rm -rf {build_dir}/pyproject.toml {build_dir}/$(PYBUILD_NAME)/tests
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
 override_dh_auto_clean:
-	${RM} -rf .pybuild
+#	dh_auto_clean
+	${RM} -rf .pybuild __pycache__ scanpy/tests/__pycache__ scanpy/__pycache__
+
+override_dh_auto_test:
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="pytest-3 -rx  --ignore=scanpy/tests/_images -cov=scanpy --cov=tests --cov=docs_src --cov-report=term-missing:skip-covered -o console_output_style=progress" \
+	dh_auto_test
 
 # If you need to rebuild the Sphinx documentation
 # Add sphinxdoc to the dh --with line



View it on GitLab: https://salsa.debian.org/med-team/scanpy/-/commit/6452c527b347ff439e03545e967fd06e7a51aa67

-- 
View it on GitLab: https://salsa.debian.org/med-team/scanpy/-/commit/6452c527b347ff439e03545e967fd06e7a51aa67
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210323/07be530a/attachment-0001.htm>


More information about the debian-med-commit mailing list