feat: Set up comprehensive Python testing infrastructure with Poetry #35
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 sets up a complete testing infrastructure for the Python course assignments project using Poetry as the package manager and pytest as the testing framework.
Changes Made
Package Management
package-mode = falsesince this is a collection of assignments rather than a distributable packagepytest ^8.3.0- Core testing frameworkpytest-cov ^6.0.0- Coverage reportingpytest-mock ^3.14.0- Mocking utilitiesTesting Configuration
pytest Configuration in
pyproject.toml:unit,integration,slowCoverage Configuration:
Directory Structure
Shared Fixtures (in conftest.py)
temp_dir- Temporary directory managementmock_config- Sample configuration datasample_data- Test data for assignmentsreset_environment- Environment cleanup (autouse)mock_file_content- Sample file contentcapture_stdout- Print statement captureproject_root- Project root path helperAdditional Updates
.gitignore: Updated with comprehensive Python, testing, and Claude-specific entriesCLAUDE.md: Initialized for project contextHow to Use
Installation
Running Tests
Writing Tests
tests/unit/ortests/integration/test_prefix for test files and functionsCoverage Reports
htmlcov/index.htmlin a browsercoverage.xmlfor CI/CD integrationNotes
package-mode = falsesince this is a course assignment collection, not a package