feat: Set up complete testing infrastructure with Poetry#5
Open
llbbl wants to merge 1 commit intoolegchomp:mainfrom
Open
feat: Set up complete testing infrastructure with Poetry#5llbbl wants to merge 1 commit intoolegchomp:mainfrom
llbbl wants to merge 1 commit intoolegchomp:mainfrom
Conversation
- Migrated from requirements.txt to Poetry package management - Added comprehensive testing configuration in pyproject.toml - Set up pytest with coverage reporting, custom markers, and strict options - Created modular test directory structure with unit/integration separation - Added comprehensive shared fixtures in conftest.py for common testing needs - Configured coverage reporting with 80% threshold, HTML and XML output - Made ndi-python optional due to platform compatibility issues - Added complete .gitignore with testing and development entries - Set up Poetry scripts for `poetry run test` and `poetry run tests` - Created validation tests to verify infrastructure setup - All tests passing with proper fixture isolation and marker configuration
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 Complete Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the StreamDiffusion NDI project, migrating from a basic
requirements.txtsetup to a professional Poetry-managed development environment with full testing capabilities.Key Changes Made
requirements.txtto Poetry with proper dependency managementtests/unit/,tests/integration/)pyproject.tomlconftest.pyfor common testing patternsunit,integration,slow) for test categorizationpoetry run test,poetry run tests).gitignorewith testing and development entriesTesting Infrastructure Components
Package Management
opencv-python,python-osc)ndi-pythonmade optional due to platform compatibilityTesting Dependencies
pytest: Main testing framework with comprehensive configurationpytest-cov: Coverage reporting with multiple output formatspytest-mock: Advanced mocking utilities for test isolationTest Configuration Features
Shared Fixtures Available
temp_dir,temp_file: Temporary file system utilitiessample_config,mock_config_file: Configuration management fixturesmock_opencv,mock_ndi,mock_osc_client: Mock external dependenciessample_image_array: Mock image data for computer vision testingmock_environment_vars: Environment isolation for testingcapture_logs: Log capture and assertion utilitiesInstructions for Running Tests
Basic Test Commands
Coverage Reports
Development Workflow
Notes and Considerations
ndi-pythondependency was made optional due to platform-specific wheel availability issues. This ensures the testing infrastructure works across different environments.pyproject.tomlbased on project requirements.Validation
The testing infrastructure is now ready for developers to begin writing comprehensive tests for the StreamDiffusion NDI codebase.