feat: Set up comprehensive Python testing infrastructure with Poetry#224
Open
llbbl wants to merge 1 commit intosublimehq:masterfrom
Open
feat: Set up comprehensive Python testing infrastructure with Poetry#224llbbl wants to merge 1 commit intosublimehq:masterfrom
llbbl wants to merge 1 commit intosublimehq:masterfrom
Conversation
- Initialize Poetry as package manager with pyproject.toml - Add pytest, pytest-cov, and pytest-mock as dev dependencies - Configure pytest with custom markers (unit, integration, slow) - Set up coverage reporting with 80% threshold and multiple output formats - Create testing directory structure with unit/integration separation - Add comprehensive conftest.py with Sublime Text-specific fixtures - Create validation tests to verify infrastructure setup - Update .gitignore with testing and development artifacts - Configure Poetry scripts for running tests via 'poetry run test(s)'
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 Vintage
Summary
This PR sets up a comprehensive testing infrastructure for the Vintage project using modern Python tooling. The setup provides a solid foundation for writing and maintaining tests, with proper dependency management, test organization, and coverage reporting.
Changes Made
Package Management
pyproject.tomlTesting Framework
unit,integration,slow)tests/directoryCoverage Reporting
Test Organization
Fixtures and Utilities
The
conftest.pyfile provides comprehensive fixtures for testing Sublime Text plugins:temp_dirandtemp_file- Temporary file system resourcesmock_sublime- Mocked Sublime Text APImock_sublime_plugin- Mocked plugin APImock_view,mock_edit,mock_window- Common Sublime objectsmock_settings- Settings managementsample_vintage_state- Vintage-specific state objectmock_registers- Vintage register systemDevelopment Workflow
.gitignorewith comprehensive Python and testing patternsHow to Use
Installation
Running Tests
Coverage Reports
After running tests, coverage reports are available in:
htmlcov/index.html- Interactive HTML reportcoverage.xml- Machine-readable XML formatNotes
Next Steps
With this infrastructure in place, developers can now:
The testing setup follows Python best practices and provides a solid foundation for maintaining and improving the Vintage plugin.