feat: Add comprehensive Python testing infrastructure with Poetry#137
Open
llbbl wants to merge 1 commit intotobspr:masterfrom
Open
feat: Add comprehensive Python testing infrastructure with Poetry#137llbbl wants to merge 1 commit intotobspr:masterfrom
llbbl wants to merge 1 commit intotobspr:masterfrom
Conversation
- Set up Poetry for modern dependency management (package-mode=false) - Add pytest with coverage, mock support, and custom markers - Configure test discovery, coverage thresholds, and reporting - Create organized test structure with unit/integration directories - Add comprehensive pytest fixtures for common testing scenarios - Update .gitignore with testing and Poetry-related patterns - Create validation tests to verify infrastructure setup
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.
Add Python Testing Infrastructure to RenderPipeline
Summary
This PR establishes a comprehensive testing infrastructure for the RenderPipeline project using modern Python tooling. The setup enables developers to immediately start writing tests with proper dependency management, test discovery, and coverage reporting.
Changes Made
Package Management
pyproject.tomlwith Poetry setup in package-mode=false (dependency management only)Testing Configuration
pytest Configuration:
test_*.pyand*_test.pyfilesunit,integration,slowCoverage Settings:
rpcore,rpplugins,rplibsTest Infrastructure
Directory Structure:
Shared Fixtures (in
conftest.py):temp_dir: Temporary directory managementmock_panda3d: Mock Panda3D modules for testing without installationsample_config: Sample configuration dictionariesconfig_file: Temporary YAML config filesmock_render_pipeline: Mock RenderPipeline instancemock_light,mock_plugin,mock_texture: Common mock objectssample_shader_code: Sample GLSL shader codecapture_logs: Log capture utilityAdditional Updates
.gitignoreUpdates: Added patterns for:.pytest_cache/,.coverage,htmlcov/, etc.).claude/*)How to Use
Installation
Running Tests
Writing Tests
tests/unit/ortests/integration/conftest.pyNotes
rplibs/, which are included in the coverage reportsFuture Improvements