summaryrefslogtreecommitdiff
path: root/tests/extmod/websocket_basic.py
AgeCommit message (Collapse)Author
2025-10-05extmod/modwebsocket: Enable split frames and test them.Jeff Epler
This fixes several assertion errors that were found in fuzz testing, for unimplemented portions of the websocket spec. The assertions were either turned into Python exceptions, or the missing functionality was implemented. Split frames are now enabled and work, enabling reception of frames up to 64kB (assuming they are encoded with a 16-bit size field). Frames with a 64-bit size fields remain unsupported but no longer result in an assertion error. Instead, Initial reception of such a frame will result in OSError(EIO) and subsequent operations on the same websocket will fail because framing has been lost. Transmitting frames larger than 64kB is unsupported. Attempting to transmit such a frame will result in OSError(ENOBUFS). Subsequent operations on the websocket are possible. Signed-off-by: Jeff Epler <jepler@gmail.com>
2023-06-08tests: Replace umodule with module everywhere.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-02top: Update Python formatting to black "2023 stable style".Jim Mussared
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-04-23tests: Use .errno instead of .args[0] for OSError exceptions.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2019-02-14extmod/moduwebsocket: Refactor `websocket` to `uwebsocket`.Yonatan Goldschmidt
As mentioned in #4450, `websocket` was experimental with a single intended user, `webrepl`. Therefore, we'll make this change without a weak link `websocket` -> `uwebsocket`.
2017-06-10tests: Convert remaining "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-03-10tests/extmod: Rename websocket test to websocket_basic.Damien George
This is so that the filename of the test doesn't clash with the module name itself (being "websocket"), and lead to potential problems executing the test.