mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
10 new tests in tests/unit/test_g4_transport_symmetry.py covering all G4 findings: - test_g4_tcp_send_write_error_fires_disconnect (F04): TCP write OSError fires _disconnect_callback. - test_g4_serial_send_no_transport_fires_disconnect (NEW-A): serial send on None transport fires _disconnect_callback. - test_g4_serial_send_write_error_fires_disconnect (F04): serial write OSError fires _disconnect_callback. - test_g4_ble_send_no_client_fires_disconnect (F04): BLE send with no client fires _disconnect_callback. - test_g4_serial_connect_timeout (F18): connect raises TimeoutError when connection_made never fires. - test_g4_tcp_oversize_frame_empty_data_returns (M06): oversize header with empty trailing data returns without dispatch. - test_g4_serial_oversize_frame_empty_data_returns (M06): same for serial transport. - test_g4_tcp_receive_count_per_frame_not_per_segment (N04): 3 TCP segments carrying 1 frame yield _receive_count == 1. - test_g4_tcp_multiple_frames_count_correctly (N04): 2 complete frames yield _receive_count == 2. F16 and F17 are covered by the updated pre-existing test in tests/test_ble_pin_pairing.py (committed with F17). Refs: Forensics report findings F04, NEW-A, F18, M06, N04 |
||
|---|---|---|
| .. | ||
| 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