Files
meshcore_py/tests
Maxwell BurtonandClaude Sonnet 5.5 9f22c05b0c Wait for CHANNEL_DATA_RECV in get_msg()
The companion protocol lists PACKET_CHANNEL_DATA_RECV (0x1B) as an
answer to GET_MESSAGE (0x0A). PR #88 added the CHANNEL_DATA_RECV
event and parser, but get_msg() still waited only for
CONTACT_MSG_RECV, CHANNEL_MSG_RECV, ERROR and NO_MORE_MSGS. When the
next queued message is a channel datagram, get_msg() therefore ignored
the device's answer and returned ERROR (reason "timeout") after
default_timeout, which also stops the auto-fetch loop.

Add CHANNEL_DATA_RECV to the expected events and cover it with a test
that runs a real CHANNEL_DATA_RECV frame through MessageReader and
EventDispatcher.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-02 17:03:17 +00:00
..
2025-04-13 22:55:39 -07:00

MeshCore Tests

Running Tests

To run the tests, first install the development dependencies:

pip install -e ".[dev]"

Then run the tests using pytest:

# Run all tests
pytest

# Run tests with verbose output
pytest -v

# Run a specific test file
pytest tests/unit/test_commands.py

# Run a specific test
pytest tests/unit/test_commands.py::test_send_msg