``` ====================================== FAILURES ====================================== ______________________________ test_writer_bad_message _______________________________ wfile = <_io.BytesIO object at 0x7f76043e6d60> writer = <pylsp_jsonrpc.streams.JsonRpcStreamWriter object at 0x7f760392a8e0> 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 0x7f76043e6d60>() E + where <built-in method getvalue of _io.BytesIO object at 0x7f76043e6d60> = <_io.BytesIO object at 0x7f76043e6d60>.getvalue test/test_streams.py:118: AssertionError ============================== short test summary info =============================== FAILED test/test_streams.py::test_writer_bad_message - AssertionError: assert b'Con... ============================ 1 failed, 26 passed in 0.10s ============================ ```
Activity
Adjust test_writer_bad_message for ujson
Merge pull request python-lsp#6 from xiaoxiae/develop
papoteur-mga commentedon Sep 19, 2023
I still get the same error with the 1.1.1 release.
lcheylus commentedon Oct 3, 2023
Same error with release 1.1.2 on OpenBSD with Python 3.10 and ujson-5.8.0