mcp23009e: Add test scenario for I/O expander driver.#49
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new YAML-driven test scenario for the mcp23009e I/O expander driver and extends the scenario runner/bridge to support drivers that require extra constructor Pin arguments or custom hardware-side initialization.
Changes:
- Add
tests/scenarios/mcp23009e.yamlcovering mock + hardware + manual checks for MCP23009E. - Extend the mock scenario runner to pass additional constructor kwargs via
mock_pins. - Extend the mpremote bridge / scenario runner to support
hardware_initfor custom device initialization on hardware.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_scenarios.py | Adds mock_pins handling for mock instantiation and threads hardware_init into hardware method calls. |
| tests/scenarios/mcp23009e.yaml | New MCP23009E scenario with mock register setup, method-call tests, and a manual hardware check. |
| tests/runner/mpremote_bridge.py | Adds hardware_init option to override device initialization code executed on-board. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
89fc570 to
394e5a1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #35
Summary
mock_pinssupport to test framework for drivers requiring constructor pin argshardware_initsupport to mpremote bridge for custom device initialization on hardwarehardware_scriptaction type for running complete MicroPython scripts on boardinteractiveaction type for prompt-then-read testswait: falseoption to skip Enter between grouped interactive testsreset_pin(RST_EXPANDER on STeaMi) for constructorTests
Test commands
Test results