-
-
Notifications
You must be signed in to change notification settings - Fork 492
feat: Add complete testing infrastructure with Poetry#12
Open
llbbl wants to merge 1 commit intoCharlesPikachu:master from
Open
feat: Add complete testing infrastructure with Poetry #12llbbl wants to merge 1 commit intoCharlesPikachu:master from
llbbl wants to merge 1 commit intoCharlesPikachu:master from
Conversation
- Set up Poetry as package manager with pyproject.toml - Add testing dependencies: pytest, pytest-cov, pytest-mock - Configure pytest with custom markers and coverage settings - Create test directory structure with unit/integration folders - Add comprehensive conftest.py with shared fixtures - Update .gitignore with testing and Claude entries - 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 Complete Testing Infrastructure
Summary
This PR sets up a complete testing infrastructure for the pytools project using Poetry as the package manager and pytest as the testing framework.
Changes Made
Package Management
pyproject.tomlwith complete Poetry configurationrequirements.txtto PoetryTesting Configuration
Pytest Configuration:
Coverage Settings:
Project Structure
Shared Fixtures (conftest.py)
temp_dir- Temporary directory managementtemp_file- Temporary file creationmock_config- Mock configuration datamock_json_file- JSON file fixturesmock_response- HTTP response mockingmock_qt_app- PyQt5 application mockingsample_image_path- Image file fixturesmock_email_server- Email server mockingenv_vars- Environment variable managementCommands Available
poetry run test- Run all testspoetry run tests- Alternative command (both work)Testing the Setup
Install dependencies:
Run validation tests:
poetry run test tests/test_setup_validation.pyRun all tests with coverage:
poetry run testNotes
poetry.lockfile should be committed to ensure reproducible buildsNext Steps
tests/unitandtests/integrationdirectoriesconftest.pyfor common testing needs@pytest.mark.unit,@pytest.mark.integration, or@pytest.mark.slow