aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-11-14 13:09:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-11-14 13:10:42 +0000
commit0d940c92f473a294d6b15e2bf74b3ba92af70b54 (patch)
tree34ee54334e429074175a079cfca1e2d1580e4d37
parenta38596fdac13672f38b77fce9276ab9fbcc31706 (diff)
downloadalpine_aports-0d940c92f473a294d6b15e2bf74b3ba92af70b54.tar.bz2
alpine_aports-0d940c92f473a294d6b15e2bf74b3ba92af70b54.tar.xz
alpine_aports-0d940c92f473a294d6b15e2bf74b3ba92af70b54.zip
testing/py3-intervals: fix tests
patch from Arch Linux. Thanks!
-rw-r--r--testing/py3-intervals/APKBUILD8
-rw-r--r--testing/py3-intervals/pytest5.patch21
2 files changed, 26 insertions, 3 deletions
diff --git a/testing/py3-intervals/APKBUILD b/testing/py3-intervals/APKBUILD
index 85b14922b2..f6b70c9ca0 100644
--- a/testing/py3-intervals/APKBUILD
+++ b/testing/py3-intervals/APKBUILD
@@ -3,7 +3,7 @@
3pkgname=py3-intervals 3pkgname=py3-intervals
4_pkgname=intervals 4_pkgname=intervals
5pkgver=0.8.1 5pkgver=0.8.1
6pkgrel=1 6pkgrel=2
7pkgdesc="A Python module for handling intervals (ranges of comparable objects)" 7pkgdesc="A Python module for handling intervals (ranges of comparable objects)"
8url="https://github.com/kvesteri/intervals" 8url="https://github.com/kvesteri/intervals"
9arch="noarch" 9arch="noarch"
@@ -11,7 +11,8 @@ license="BSD-3-Clause"
11depends="py3-infinity" 11depends="py3-infinity"
12makedepends="py3-setuptools" 12makedepends="py3-setuptools"
13checkdepends="py3-pytest" 13checkdepends="py3-pytest"
14source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" 14source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
15 pytest5.patch"
15builddir="$srcdir"/$_pkgname-$pkgver 16builddir="$srcdir"/$_pkgname-$pkgver
16 17
17replaces="py-intervals" # Backwards compatibility 18replaces="py-intervals" # Backwards compatibility
@@ -29,4 +30,5 @@ package() {
29 python3 setup.py install --prefix=/usr --root="$pkgdir" 30 python3 setup.py install --prefix=/usr --root="$pkgdir"
30} 31}
31 32
32sha512sums="f97142d5f1c8d4da21692b856803481878ac2b2afc3b81937de456bacbf66ebb129b1fe9a070ac442cbc6bbe26fdaf2ed839f8fc8b26392b4bd1ce032d054e65 intervals-0.8.1.tar.gz" 33sha512sums="f97142d5f1c8d4da21692b856803481878ac2b2afc3b81937de456bacbf66ebb129b1fe9a070ac442cbc6bbe26fdaf2ed839f8fc8b26392b4bd1ce032d054e65 intervals-0.8.1.tar.gz
34af545bec7d8157259197e045396d69ac1791b5e0420056fca69bea444cceacaa208ae568fd80792f614e1c775611ea22c48521bdd47dbdd976a699c150835f96 pytest5.patch"
diff --git a/testing/py3-intervals/pytest5.patch b/testing/py3-intervals/pytest5.patch
new file mode 100644
index 0000000000..24b9f502d4
--- /dev/null
+++ b/testing/py3-intervals/pytest5.patch
@@ -0,0 +1,21 @@
1diff -upr intervals-0.8.1.orig/tests/interval/test_initialization.py intervals-0.8.1/tests/interval/test_initialization.py
2--- intervals-0.8.1.orig/tests/interval/test_initialization.py 2016-07-10 21:14:03.000000000 +0300
3+++ intervals-0.8.1/tests/interval/test_initialization.py 2019-11-01 17:26:19.862962549 +0200
4@@ -23,7 +23,7 @@ class TestIntervalInit(object):
5 'First argument should be a list or tuple. If you wish to '
6 'initialize an interval from string, use from_string factory '
7 'method.'
8- ) in str(e)
9+ ) in str(e.value)
10
11 def test_invalid_argument(self):
12 with raises(IllegalArgument) as e:
13@@ -31,7 +31,7 @@ class TestIntervalInit(object):
14 assert (
15 'The bounds may be equal only if at least one of the bounds is '
16 'closed.'
17- ) in str(e)
18+ ) in str(e.value)
19
20 def test_floats(self):
21 interval = FloatInterval((0.2, 0.5))