fix: declare pytest-mock as dev dependency instead of installing ad hoc in CI#155
Open
ShrijalDubey wants to merge 2 commits into
Open
fix: declare pytest-mock as dev dependency instead of installing ad hoc in CI#155ShrijalDubey wants to merge 2 commits into
ShrijalDubey wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #155 +/- ##
=======================================
Coverage ? 78.95%
=======================================
Files ? 26
Lines ? 4158
Branches ? 0
=======================================
Hits ? 3283
Misses ? 875
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Pull Request
Description
Declares
pytest-mock(and other dev/test tools) as a proper package extra instead of installing them ad hoc in CI workflows. On a fresh clone, following the documented setup (pip install -e .+pip install -r requirements.txt) leftpytest-mockmissing, causingtests/test_compose_scanner.py::test_compose_orchestrator_offlineto fail withfixture 'mocker' not found. CI didn't catch this because both workflows separately ranpip install pytest pytest-mockinline, so the dependency was declared nowhere central.Implementation follows the approach suggested by @rksharma-owg in the issue thread (extras_require in setup.py + CONTRIBUTING.md and workflow updates to match).
Closes #153
Type of Change
How Has This Been Tested?
Reproduced the bug on a fresh clone (fresh venv →
pip install -e .→pip install -r requirements.txt→pytest tests/→ 1 error, fixture not found). Installedpytest-mockmanually to confirm it fixed the failure (184 passed). Then applied the actual fix (extras_require["dev"]in setup.py + updated CONTRIBUTING.md + both workflows to usepip install -e ".[dev]") and re-ranpytest tests/from a fresh install — 184 passed, 0 errors.Test Configuration:
Checklist
Related Issues / PRs
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.