~alpine/aports

1

[alpine-aports] [PATCH 0/4] testing/py3-hypothesis: new aport

Jean-Louis Fuchs <ganwell@fangorn.ch>
Details
Message ID
<20170918174318.3993-1-ganwell@fangorn.ch>
Sender timestamp
1505756594
DKIM signature
missing
Download raw message
pytest and py-py had a version conflict, I solved it by upgrading both to
latest. Without the upgrades hypothesis' check would fail. py3-attrs the only
dependency of hypothesis is also added.



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 4/4] testing/py3-hypothesis: new aport

Jean-Louis Fuchs <ganwell@fangorn.ch>
Details
Message ID
<20170918174318.3993-5-ganwell@fangorn.ch>
In-Reply-To
<20170918174318.3993-1-ganwell@fangorn.ch> (view parent)
Sender timestamp
1505756598
DKIM signature
missing
Download raw message
Patch: +35 -0
---
 testing/py3-hypothesis/APKBUILD | 29 +++++++++++++++++++++++++++++
 testing/py3-hypothesis/check.py |  6 ++++++
 2 files changed, 35 insertions(+)
 create mode 100644 testing/py3-hypothesis/APKBUILD
 create mode 100644 testing/py3-hypothesis/check.py

diff --git a/testing/py3-hypothesis/APKBUILD b/testing/py3-hypothesis/APKBUILD
new file mode 100644
index 0000000000..9f428cd7f7
--- /dev/null
+++ b/testing/py3-hypothesis/APKBUILD
@@ -0,0 +1,29 @@
# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch>
pkgname=py3-hypothesis
pkgver=3.28.3
pkgrel=0
pkgdesc="Hypothesis is an advanced testing library for Python"
url="http://hypothesis.works/"
arch="noarch"
license="MPL"
depends="python3 py3-attrs"
makedepends="python3-dev py3-pytest"
source="py3-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/$pkgver.tar.gz"
builddir="$srcdir/hypothesis-python-$pkgver"

build() {
	cd "$builddir"
	python3 setup.py build
}

check() {
	PYTHONPATH="$builddir/src" pytest-3 check.py
}

package() {
	cd "$builddir"
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="402f116c215af4b57f9702b6af716f0b43a0dd8ee75dc609a0c430fb516dccbab57b438a58590259b25e1bbefaae05dfb28eec80242c599864bc352b98b269b5  py3-hypothesis-3.28.3.tar.gz"
diff --git a/testing/py3-hypothesis/check.py b/testing/py3-hypothesis/check.py
new file mode 100644
index 0000000000..1250548c7d
--- /dev/null
+++ b/testing/py3-hypothesis/check.py
@@ -0,0 +1,6 @@
from hypothesis import given
from hypothesis.strategies import text

@given(s=text())
def test_decode_inverts_encode(s):
    assert s.encode("UTF").decode("UTF-8") == s
-- 
2.13.5



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)