X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mailauth3.nine.ch (mailauth3.nine.ch [94.230.211.187]) by lists.alpinelinux.org (Postfix) with ESMTP id E10245C5682 for ; Mon, 18 Sep 2017 17:43:53 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mailauth3.nine.ch (Postfix) with ESMTP id 6E47B11F95F; Mon, 18 Sep 2017 19:43:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mailauth3.nine.ch X-Spam-Flag: NO X-Spam-Score: -0.998 X-Spam-Level: X-Spam-Status: No, score=-0.998 tagged_above=-999 required=5.6 tests=[ALL_TRUSTED=-1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, TVD_SPACE_RATIO=0.001] autolearn=disabled Received: from mailauth3.nine.ch ([127.0.0.1]) by localhost (mailauth3.nine.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id reGxhbVxw95e; Mon, 18 Sep 2017 19:43:32 +0200 (CEST) Received: from vimes (office.adfinis.com [95.128.36.166]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pf@1042.ch) by mailauth3.nine.ch (Postfix) with ESMTPSA; Mon, 18 Sep 2017 19:43:32 +0200 (CEST) Received: by vimes (Postfix, from userid 1000) id AC4472040A; Mon, 18 Sep 2017 19:43:32 +0200 (CEST) From: Jean-Louis Fuchs To: alpine-aports@lists.alpinelinux.org Cc: Jean-Louis Fuchs Subject: [alpine-aports] [PATCH 4/4] testing/py3-hypothesis: new aport Date: Mon, 18 Sep 2017 19:43:18 +0200 Message-Id: <20170918174318.3993-5-ganwell@fangorn.ch> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170918174318.3993-1-ganwell@fangorn.ch> References: <20170918174318.3993-1-ganwell@fangorn.ch> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- 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 +# Maintainer: Jean-Louis Fuchs +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 ---