mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
Why: When BLE pairing failed during connect(), the exception was caught as a warning and connect() continued normally. This left the transport in a half-usable state — the BLE link was up but the pairing handshake never completed, so encrypted characteristics could silently fail. Now the pairing exception disconnects the client and re-raises, giving the caller a clean failure. Updated the pre-existing test_ble_connection_with_pin_failed_pairing test to assert the re-raise behavior instead of the old swallow-and-continue behavior. Refs: Forensics report finding F17
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