diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-18 22:21:59 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-18 22:23:10 +0100 |
commit | d4a0dc906865560db091a3f580a97cbd2d4ad6fb (patch) | |
tree | 472544d18a76f202a0abec304fd935cafcc26c9d /dev-python/test_server/test_server-0.0.31.ebuild | |
parent | dev-python/test_server: New package (diff) | |
download | gentoo-d4a0dc906865560db091a3f580a97cbd2d4ad6fb.tar.gz gentoo-d4a0dc906865560db091a3f580a97cbd2d4ad6fb.tar.bz2 gentoo-d4a0dc906865560db091a3f580a97cbd2d4ad6fb.zip |
dev-python/test_server: Enable py2.7, fix tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/test_server/test_server-0.0.31.ebuild')
-rw-r--r-- | dev-python/test_server/test_server-0.0.31.ebuild | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dev-python/test_server/test_server-0.0.31.ebuild b/dev-python/test_server/test_server-0.0.31.ebuild index 37e2a350c72d..823107ea4a80 100644 --- a/dev-python/test_server/test_server-0.0.31.ebuild +++ b/dev-python/test_server/test_server-0.0.31.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{5,6,7} ) +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) inherit distutils-r1 DESCRIPTION="Server to test HTTP clients" @@ -22,3 +22,14 @@ RDEPEND=" BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # broken on py2.7, upstream knows + sed -i -e '5a\ +import sys' \ + -e '/test_null_bytes/i\ +@pytest.mark.skipif(sys.hexversion < 0x03000000, reason="broken on py2")' \ + test/server.py || die +} |