https://bugzilla.redhat.com/show_bug.cgi?id=1979275
--- Comment #9 from Miro Hrončok <mhroncok(a)redhat.com> ---
The package does not build for me:
+ pytest
============================= test session starts
==============================
platform linux -- Python 3.10.0b3, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /builddir/build/BUILD/python-lsp-jsonrpc-1.0.0, configfile: setup.cfg,
testpaths: test
plugins: cov-2.11.1
collected 27 items
test/test_endpoint.py ...................... [ 81%]
test/test_streams.py ....F [100%]
=================================== FAILURES
===================================
___________________________ test_writer_bad_message
____________________________
wfile = <_io.BytesIO object at 0x7febc95eba10>
writer = <pylsp_jsonrpc.streams.JsonRpcStreamWriter object at 0x7febc8a5bb50>
def test_writer_bad_message(wfile, writer):
# A datetime isn't serializable(or poorly serializable),
# ensure the write method doesn't throw, but the result could be empty
# or the correct datetime
datetime.datetime = JsonDatetime
writer.write(datetime.datetime(
year=2019,
month=1,
day=1,
hour=1,
minute=1,
second=1,
))
assert wfile.getvalue() in [
b'',
b'Content-Length: 10\r\n'
b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
b'\r\n'
b'1546304461',
b'Content-Length: 10\r\n'
b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
b'\r\n'
b'1546322461'
]
E AssertionError: assert b'Content-Length: 10\r\nContent-Type:
application/vscode-jsonrpc; charset=utf8\r\n\r\n1546300861' in [b'',
b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc;
charset=utf8\r\n\r\n1546304461', b'Content-Length: 10\r\nContent-Type:
application/vscode-jsonrpc; charset=utf8\r\n\r\n1546322461']
E + where b'Content-Length: 10\r\nContent-Type:
application/vscode-jsonrpc; charset=utf8\r\n\r\n1546300861' = <built-in method
getvalue of _io.BytesIO object at 0x7febc95eba10>()
E + where <built-in method getvalue of _io.BytesIO object at
0x7febc95eba10> = <_io.BytesIO object at 0x7febc95eba10>.getvalue
test/test_streams.py:118: AssertionError
- generated xml file: /builddir/build/BUILD/python-lsp-jsonrpc-1.0.0/pytest.xml
-
----------- coverage: platform linux, python 3.10.0-beta-3 -----------
Name Stmts Miss Cover
--------------------------------------------------
pylsp_jsonrpc/__init__.py 2 0 100%
pylsp_jsonrpc/_version.py 2 0 100%
pylsp_jsonrpc/dispatchers.py 19 19 0%
pylsp_jsonrpc/endpoint.py 138 5 96%
pylsp_jsonrpc/exceptions.py 60 6 90%
pylsp_jsonrpc/streams.py 67 14 79%
test/__init__.py 0 0 100%
test/test_endpoint.py 133 4 97%
test/test_streams.py 49 1 98%
--------------------------------------------------
TOTAL 470 49 90%
Coverage HTML written to dir htmlcov
=========================== short test summary info
============================
FAILED test/test_streams.py::test_writer_bad_message - AssertionError:
assert...
========================= 1 failed, 26 passed in 0.36s
=========================
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component