mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
12 new tests in tests/unit/test_g2_error_handling.py covering all G2 findings: - test_g2_event_is_error_true/false (F22): is_error() helper works. - test_g2_send_msg_with_retry_error_no_keyerror (F21/M01): retry loop continues on ERROR instead of KeyError on missing expected_ack. - test_g2_send_appstart_returns_error (M02): ERROR event returned immediately instead of hanging until timeout. - test_g2_set_telemetry_mode_base/loc/env_error (M04): setters return ERROR instead of KeyError on appstart failure. - test_g2_set_manual_add_contacts/advert_loc_policy/multi_acks_error (M04): remaining three setters return ERROR cleanly. - test_g2_send_anon_req_contact_not_found (N06): returns ERROR instead of TypeError on NoneType subscript. - test_g2_send_trace_unknown_path_hash_len (F14): returns ERROR instead of NameError on undefined 'e'. Refs: Forensics report findings F22, F21, M01, M02, M04, N06, F14 |
||
|---|---|---|
| .. | ||
| unit | ||
| README.md | ||
| test_ble_connection.py | ||
| test_ble_pin_pairing.py | ||
| test_meshcore_ble_pin.py | ||
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