mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/python-jsonrpc-server: fix bug in tests with ujson>3
Closes: https://bugs.gentoo.org/715290 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
committed by
Joonas Niilola
parent
127c92ca22
commit
dbc464b7fc
@@ -0,0 +1,12 @@
|
||||
diff --git a/test/test_streams.py b/test/test_streams.py
|
||||
index 6985aec..9e64489 100644
|
||||
--- a/test/test_streams.py
|
||||
+++ b/test/test_streams.py
|
||||
@@ -119,6 +119,7 @@ def test_writer_bad_message(wfile, writer):
|
||||
hour=1,
|
||||
minute=1,
|
||||
second=1,
|
||||
+ tzinfo=datetime.timezone.utc
|
||||
))
|
||||
|
||||
assert wfile.getvalue() in [
|
||||
@@ -21,17 +21,15 @@ BDEPEND="dev-python/versioneer[${PYTHON_USEDEP}]
|
||||
dev-python/pycodestyle[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
RDEPEND="~dev-python/ujson-1.35[${PYTHON_USEDEP}]"
|
||||
RDEPEND=">=dev-python/ujson-3[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-0.4.0-fix-test-with-ujson-3-and-up.patch" )
|
||||
|
||||
python_prepare_all() {
|
||||
# Remove pytest-cov dep
|
||||
sed -i -e '0,/addopts/I!d' setup.cfg || die
|
||||
|
||||
# jsonrpc-server does not actually work with ujson>3.0.0: tests fail
|
||||
sed -i -e 's/ujson>=3.0.0/ujson==1.35/g' setup.py || die
|
||||
sed -i -e 's/ujson>=3.0.0/ujson==1.35/g' python_jsonrpc_server.egg-info/requires.txt || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
Reference in New Issue
Block a user