feat: Set up complete testing infrastructure with Poetry #5
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.