summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo J. S. Bellini2022-06-13 20:58:21 -0300
committerDanilo J. S. Bellini2022-06-13 20:58:21 -0300
commit08b462d39ef8a0121ab6800032524945ad515bfe (patch)
tree1f3c68d6e911851a49b2b5ef4c7877ceaf07c02f
parentf606284cae25115a263a19bca49b652245adcbda (diff)
downloadaur-python2-unittest2.tar.gz
Make tests ignore the builtins package (v1.1.0-8)
That's the Python 3 package, it should not exist on Python 2, but in any case that's just a test-specific patch (not for unittest2 usage) The tests are more verbose now, too
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 321f4d173468..5b980c5a4327 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python2-unittest2
pkgdesc = Backports of the unittest module
pkgver = 1.1.0
- pkgrel = 7
+ pkgrel = 8
url = http://www.voidspace.org.uk/python/articles/unittest2.shtml
arch = any
license = BSD
diff --git a/PKGBUILD b/PKGBUILD
index 7bdd22a4813b..1564111e7817 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=python2-unittest2
_name="${pkgname#python2-}"
pkgver=1.1.0
-pkgrel=7
+pkgrel=8
pkgdesc='Backports of the unittest module'
arch=('any')
url="http://www.voidspace.org.uk/python/articles/unittest2.shtml"
@@ -23,6 +23,11 @@ prepare() {
# Remove "argparse" dependency (it's actually a standard library)
sed -ri 's-.argparse.(,|\s)*--' setup.py
+
+ # Remove trial to import "builtins", it's specific to Python 3
+ # and it makes one test fail when a package with that name exists
+ sed -ri '1,14{N;N;s-^\s+|.*import\s+builtins.*--}' \
+ unittest2/test/test_discovery.py
}
build() {
@@ -32,7 +37,7 @@ build() {
check() {
cd "$srcdir/$_name-$pkgver"
- python2 -m unittest2
+ python2 -m unittest2 discover -v -t . -s unittest2/test/
}
package() {