diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-22 15:29:35 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-22 17:21:04 +0100 |
commit | 2265797ee76d7c0bf2a07259dfa41b77c86bcd65 (patch) | |
tree | b992dcd67c83a8bdcc4a644473ae355da2368012 /dev-python/pytest-httpbin | |
parent | dev-python/httpbin: Bump to 0.7.0 (diff) | |
download | gentoo-2265797ee76d7c0bf2a07259dfa41b77c86bcd65.tar.gz gentoo-2265797ee76d7c0bf2a07259dfa41b77c86bcd65.tar.bz2 gentoo-2265797ee76d7c0bf2a07259dfa41b77c86bcd65.zip |
dev-python/pytest-httpbin: Bump to 1.0.0, fix tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pytest-httpbin')
-rw-r--r-- | dev-python/pytest-httpbin/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pytest-httpbin/files/pytest-httpbin-1.0.0-pypy3-hang.patch | 31 | ||||
-rw-r--r-- | dev-python/pytest-httpbin/pytest-httpbin-1.0.0.ebuild | 30 |
3 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/pytest-httpbin/Manifest b/dev-python/pytest-httpbin/Manifest index c25da0561c3b..1425c261b394 100644 --- a/dev-python/pytest-httpbin/Manifest +++ b/dev-python/pytest-httpbin/Manifest @@ -1 +1,2 @@ DIST pytest-httpbin-0.2.3.tar.gz 9498 BLAKE2B ad41f72c80430eeea8c7f48185daf63c6adddfad36798179df27677aacc8af85419a678ba6f3df5281ca7f7ba0b3ee721cd97e5fe86eb5117417be53332f98e8 SHA512 f3c4eb67d1b02c27d8edb42622793fa3604e3f0bd5086e4986b8f0402a9fb8d7969a466be92fc6a7e301e829dbeb300183b40dccc9ec5da1d158cb4d08274f8b +DIST pytest-httpbin-1.0.0.gh.tar.gz 17813 BLAKE2B b7e0ad9f131e4d236161b66b1d6d8e6087285a6d52df1accb044b30bcdac6c5f3350e9dbfe1cf33ab64b6d6aac6b463de81c31fd12dd950426b6ed8ef4eaf289 SHA512 2794134cc005cb969752e0c1119459d3f1e106f679942880a6b9ff507f2ee31c8ac4146a9c01b9a920368ea516443954b1b7044f7b1c270fe251f7d36adf7661 diff --git a/dev-python/pytest-httpbin/files/pytest-httpbin-1.0.0-pypy3-hang.patch b/dev-python/pytest-httpbin/files/pytest-httpbin-1.0.0-pypy3-hang.patch new file mode 100644 index 000000000000..02f63bffa72d --- /dev/null +++ b/dev-python/pytest-httpbin/files/pytest-httpbin-1.0.0-pypy3-hang.patch @@ -0,0 +1,31 @@ +diff -dupr a/pytest_httpbin/serve.py b/pytest_httpbin/serve.py +--- a/pytest_httpbin/serve.py 2019-02-11 20:54:14.000000000 +0100 ++++ b/pytest_httpbin/serve.py 2019-11-22 15:50:17.407769297 +0100 +@@ -116,6 +116,7 @@ class Server(object): + + def stop(self): + self._server.shutdown() ++ self._server.socket.close() + + @property + def url(self): +Only in b: pytest_httpbin.egg-info +Only in b/tests: __pycache__ +diff -dupr a/tests/test_httpbin.py b/tests/test_httpbin.py +--- a/tests/test_httpbin.py 2019-02-11 20:54:14.000000000 +0100 ++++ b/tests/test_httpbin.py 2019-11-22 15:59:53.955324547 +0100 +@@ -1,3 +1,4 @@ ++import sys + import unittest + import requests + import pytest_httpbin +@@ -40,6 +41,8 @@ def test_httpbin_join(httpbin): + def test_httpbin_str(httpbin): + assert httpbin + '/foo' == httpbin.url + '/foo' + ++@unittest.skipIf(hasattr(sys, 'pypy_version_info') ++ and sys.hexversion >= 0x03000000, 'hangs on PyPy3') + def test_chunked_encoding(httpbin_both): + assert requests.get(httpbin_both.url + '/stream/20').status_code == 200 + +Only in b: .tox diff --git a/dev-python/pytest-httpbin/pytest-httpbin-1.0.0.ebuild b/dev-python/pytest-httpbin/pytest-httpbin-1.0.0.ebuild new file mode 100644 index 000000000000..e13e8f79c0ba --- /dev/null +++ b/dev-python/pytest-httpbin/pytest-httpbin-1.0.0.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) + +inherit distutils-r1 + +DESCRIPTION="Easily test your HTTP library against a local copy of httpbin" +HOMEPAGE="https://github.com/kevin1024/pytest-httpbin + https://pypi.org/project/pytest-httpbin/" +SRC_URI="https://github.com/kevin1024/pytest-httpbin/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + dev-python/httpbin[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}"/pytest-httpbin-1.0.0-pypy3-hang.patch +) + +distutils_enable_tests pytest |