tests: deduplicate environment check output helper#10983
Open
loulanyue wants to merge 1 commit into
Open
Conversation
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.
Relates-to: #3155
Summary
check_outputmock intotests.helpers/usrbase prefix and the environment manager tests' runtimesys.base_prefixThis removes 34 net lines while keeping the existing test behavior unchanged.
Verification
pytest -n 0 tests/console/commands/env/test_use.py tests/console/commands/env/test_remove.py tests/utils/env/test_env_manager.py(68 passed)mypy tests/helpers.py tests/console/commands/env/helpers.py tests/console/commands/env/test_remove.py tests/console/commands/env/test_use.py tests/utils/env/test_env_manager.pypre-commit run --files tests/helpers.py tests/console/commands/env/helpers.py tests/console/commands/env/test_remove.py tests/console/commands/env/test_use.py tests/utils/env/test_env_manager.pyThe local Homebrew environment provides
python3but no barepython, so the pytest run used a temporary PATH entry mappingpythontopython3. No repository files were changed for that local environment difference.Checklist