summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-07-19 16:14:57 -0700
committerZac Medico <zmedico@gentoo.org>2020-07-19 16:23:39 -0700
commitecf95dacd9dfd851930929b9355ae63c6f165ce4 (patch)
tree4a7bcefe702d20b55d438cec1afa71622369b32f
parentsys-apps/portage: upgrade 9999 to EAPI 7 (diff)
downloadgentoo-ecf95dacd9dfd851930929b9355ae63c6f165ce4.tar.gz
gentoo-ecf95dacd9dfd851930929b9355ae63c6f165ce4.tar.bz2
gentoo-ecf95dacd9dfd851930929b9355ae63c6f165ce4.zip
dev-python/aiohttp: Fix tests (bug 733226)
Closes: https://bugs.gentoo.org/733226 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--dev-python/aiohttp/aiohttp-3.6.2.ebuild13
1 files changed, 12 insertions, 1 deletions
diff --git a/dev-python/aiohttp/aiohttp-3.6.2.ebuild b/dev-python/aiohttp/aiohttp-3.6.2.ebuild
index a780dad283a9..d38b1553b962 100644
--- a/dev-python/aiohttp/aiohttp-3.6.2.ebuild
+++ b/dev-python/aiohttp/aiohttp-3.6.2.ebuild
@@ -29,6 +29,7 @@ DEPEND="
dev-python/cython[${PYTHON_USEDEP}]
test? (
${COMMON_DEPEND}
+ !!dev-python/pytest-aiohttp
dev-python/async_generator[${PYTHON_USEDEP}]
dev-python/brotlipy[${PYTHON_USEDEP}]
dev-python/freezegun[${PYTHON_USEDEP}]
@@ -111,6 +112,9 @@ python_prepare_all() {
sed -e 's|^def test_aiohttp_plugin_async_fixture(|@pytest.mark.xfail\n\0|' \
-i tests/test_pytest_plugin.py || die
+ sed -e 's|^def test_static(|@pytest.mark.xfail\n\0|' \
+ -i tests/test_route_def.py || die
+
sed -e 's|^async def test_mixed_middleware(|@pytest.mark.xfail\n\0|' \
-e 's|^async def test_new_style_middleware_class(|@pytest.mark.xfail\n\0|' \
-e 's|^async def test_new_style_middleware_method(|@pytest.mark.xfail\n\0|' \
@@ -121,6 +125,9 @@ python_prepare_all() {
sed -e 's|^async def test_client_disconnect(|@pytest.mark.xfail\n\0|' \
-i tests/test_web_protocol.py || die
+ sed -e 's|^async def test_static_file_range(|@pytest.mark.xfail\n\0|' \
+ -i tests/test_web_sendfile_functional.py || die
+
sed -e 's|^async def test_partially_applied_handler(|@pytest.mark.xfail\n\0|' \
-i tests/test_web_urldispatcher.py || die
@@ -134,5 +141,9 @@ python_prepare_all() {
}
python_test() {
- pytest -vv "${S}/tests" || die "Tests fail with ${EPYTHON}"
+ pushd "${BUILD_DIR}/lib" >/dev/null || die
+ ln -snf "${S}/tests" tests || die
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ rm -rf .pytest_cache tests || die
+ popd >/dev/null || die
}