summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2021-12-25 14:49:43 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2021-12-25 16:43:26 +0100
commit126a3a828debaa9983e34ac82306077d4c645b20 (patch)
tree8c52a222dc939424965b6bef30dd0f9cd3b95cf8
parent65406f7b72f4004e4483573640cf0d555877dd55 (diff)
Run unit tests with pytest when building Debian package
By default, pybuild uses the following command to run automatic unit tests: $ python3 -m unittest discover Unfortunately, it does not work with us since unittest is unable to discover our tests. Instead, we rely on pytest which succeeds so far. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rw-r--r--debian/control7
-rwxr-xr-xdebian/rules1
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/control b/debian/control
index 7c5e8b8..04158c6 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,12 @@ Source: swiftstory
Maintainer: Olivier Gayot <olivier.gayot@sigexec.com>
Section: python
Priority: optional
-Build-Depends: python3-setuptools, dh-python, python3, debhelper (>= 9)
+Build-Depends: python3-setuptools,
+ dh-python,
+ debhelper (>= 9),
+ python3-pytest,
+ python3-websockets,
+ python3
Standards-Version: 3.9.1
Package: swiftstory
diff --git a/debian/rules b/debian/rules
index 1c29eac..3938ed4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@
# This file was automatically generated by stdeb 0.8.2 at
# Thu, 18 Aug 2016 12:48:06 +0000
export PYBUILD_NAME=swiftstory
+export PYBUILD_TEST_PYTEST=1
%:
dh $@ --with python3 --buildsystem=pybuild