feat: Add comprehensive Python testing infrastructure #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the Kendryte210 platform project, providing developers with everything needed to write and run tests effectively.
Changes Made
Package Management
pyproject.tomlwith proper project metadata fromplatform.jsonpytest,pytest-cov,pytest-mockTesting Configuration
pyproject.toml:test_*.pyand*_test.pyfilesunit,integration,slowhtmlcov/directoryDirectory Structure
tests/directory with proper Python package structuretests/unit/andtests/integration/subdirectories for organized testingtests/conftest.pywith comprehensive shared fixtures:temp_dir: Temporary directory for test filesmock_platform_config: Mock platform configuration datamock_board_config: Mock board configuration datamock_platformio_env: Mock PlatformIO environmentValidation Tests
tests/test_setup_validation.py:Development Environment
.gitignorewith testing-related entries and Claude Code settingsRunning Tests
Installation
Running Tests
Coverage Reports
htmlcov/index.htmlin browser for detailed coverage reportcoverage.xmlfor CI/CD integrationInfrastructure Features
Next Steps
Developers can now:
tests/unit/tests/integration/The testing infrastructure is ready for immediate use and follows Python testing best practices.