git » pyalpm.git » commit 095443b

Run tests

author Jelle van der Waa
2019-01-16 18:41:12 UTC
committer Jelle van der Waa
2019-01-16 18:41:12 UTC
parent 838d70b5e3bb80ee7d8bb8278b3c5854fe1fe52e

Run tests

PKGBUILD +6 -1

diff --git a/PKGBUILD b/PKGBUILD
index d5b2840..2d4c6a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgdesc="Libalpm bindings for Python 3"
 arch=('x86_64')
 url="https://git.archlinux.org/pyalpm.git/"
 license=('GPL')
-makedepends=('git')
+makedepends=('git' 'python-pytest')
 depends=('python>=3.6' 'pacman>=5.0')
 source=("git+https://git.archlinux.org/pyalpm.git#commit=ec89afb96636a3449006323030dd1768c143c5f5")
 validpgpkeys=('E499C79F53C96A54E572FEE1C06086337C50773E')
@@ -18,6 +18,11 @@ build() {
   python setup.py build
 }
 
+check() {
+  cd ${srcdir}/${pkgname}
+  PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.7" pytest
+}
+
 package() {
   cd ${srcdir}/${pkgname}
   python setup.py install --root=${pkgdir}