test: replace obsolete dashboard-python fallback test with exit check#128
Merged
Merged
Conversation
… (#6115) scripts/pt.py:_resolve_dashboard_python was changed in commit 130d6aa to print a red error and sys.exit(1) when no venv exists, replacing the prior sys.executable fallback. The companion test test_launch_falls_back_to_sys_executable_when_no_venv_exists still asserted the old fallback path and failed on main with SystemExit: 1. Delete the broken assertion and replace it with one that locks in the new explicit-error behaviour (pytest.raises(SystemExit), code == 1). Sibling test_launch_prefers_dot_venv_python is unchanged and still exercises the happy path. Closes #6115. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
scripts/pt.py:_resolve_dashboard_pythonwas changed in commit 130d6aa to print a red error andsys.exit(1)when no venv exists, replacing the priorsys.executablefallback. The companion testtest_launch_falls_back_to_sys_executable_when_no_venv_existsstill asserted the old fallback path and was failing on main withSystemExit: 1.test_launch_exits_when_no_venv_existsthat locks in the new explicit-error behavior viapytest.raises(SystemExit)andexcinfo.value.code == 1.Test plan
tests/test_config_and_cron_fallbacks.pyall 10 tests pass locally, including the newtest_launch_exits_when_no_venv_exists.test_launch_prefers_dot_venv_python(happy-path .venv discovery) still passes unchanged.Related