meshcore_py/tests
Matthew Wolter 76e2e54157 G4: F17 — re-raise BLE pairing failure instead of swallowing
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
2026-04-11 20:25:04 -07:00
..
unit Fix 16 failing unit tests to match current source behavior 2026-04-05 18:38:16 -07:00
README.md Added in some unit tests 2025-04-13 22:55:39 -07:00
test_ble_connection.py Implement BLE PIN pairing support for enhanced security 2025-09-24 00:21:30 +02:00
test_ble_pin_pairing.py G4: F17 — re-raise BLE pairing failure instead of swallowing 2026-04-11 20:25:04 -07:00
test_meshcore_ble_pin.py Implement BLE PIN pairing support for enhanced security 2025-09-24 00:21:30 +02: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