feat: Set up comprehensive Python testing infrastructure#34
Open
llbbl wants to merge 1 commit intomilouk:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure#34llbbl wants to merge 1 commit intomilouk:mainfrom
llbbl wants to merge 1 commit intomilouk:mainfrom
Conversation
- Add Poetry package manager with pyproject.toml configuration - Migrate existing dependencies from requirements.txt to Poetry - Configure pytest with coverage reporting (80% threshold) - Set up testing directory structure with unit/integration folders - Create comprehensive test fixtures in conftest.py - Add validation tests to verify infrastructure setup - Update .gitignore with testing and development entries - Configure custom pytest markers (unit, integration, slow)
Owner
|
Thank you for your contribution. Could you integrate it with the CI/CD pipeline ? |
Author
|
Hey, Michael. This first PR is meant to just set up testing. But, okay. Are you running your CI/CD in GitHub Actions? |
Owner
|
Yes. Also it is not clear to me how to run tests locally. Can you please add some instructions? |
Author
|
Can you handle making a VM with MuOS? Seems with QEMU we can run it in a github action. example: From Gemini: build vm github action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Set up Python Testing Infrastructure
Summary
This PR establishes a complete testing infrastructure for the Artie project, enabling developers to write and run tests with ease. The setup includes Poetry package management, pytest configuration with coverage reporting, and comprehensive test fixtures.
Changes Made
Package Management
pyproject.tomlconfigurationrequirements.txtto Poetry formatTesting Configuration
pyproject.toml:unit,integration,slowDirectory Structure
tests/- Main test directorytests/unit/- Unit teststests/integration/- Integration tests__init__.pyfilesTest Infrastructure
tests/conftest.py:temp_dir- Temporary directory creationsample_config- Mock configuration dataconfig_file- Temporary config file creationsample_rom_data- Mock ROM metadatamock_rom_files- Mock ROM file structuresample_image- PIL image fixturesDevelopment Environment
.coverage,htmlcov/,coverage.xml).pytest_cache/).claude/*)Validation
tests/test_infrastructure.py):How to Run Tests
Using Poetry (Recommended)
Coverage Reports
htmlcov/directorycoverage.xmlfor CI integrationDependencies Added
Production Dependencies
requests==2.32.4(migrated from requirements.txt)Pillow==11.3.0(migrated from requirements.txt)Test Dependencies
pytest ^8.0.0- Testing frameworkpytest-cov ^5.0.0- Coverage reportingpytest-mock ^3.12.0- Mocking utilitiestoml ^0.10.2- TOML parsing for configuration validationConfiguration Notes
^3.9(required by Pillow 11.3.0)test_*.pyand*_test.pyfilesReady for Development
This infrastructure provides everything needed to start writing comprehensive tests:
Developers can now immediately start writing unit and integration tests for the Artie codebase with full coverage tracking and professional testing practices.