Fix: test runner UX bugs and improve Butler test isolation#121
Open
kamilansri wants to merge 1 commit intoML4SCI:mainfrom
Open
Fix: test runner UX bugs and improve Butler test isolation#121kamilansri wants to merge 1 commit intoML4SCI:mainfrom
kamilansri wants to merge 1 commit intoML4SCI:mainfrom
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.
Summary
This PR addresses several usability and robustness issues in the manual test runner (
run_tests.py) and improves the isolation of the Butler repository creation tests to prevent environment side effects.Changes
run_tests.py(Test Runner)1-,1-3-5, or non-numeric strings now return friendly error messages instead of crashing with a traceback.KeyboardInterrupthandling to ensure a clean exit (without tracebacks) when the user pressesCtrl+C.Butler Creation Test Script
/tmp/test_repo) withtempfile.TemporaryDirectory()context managers. This ensures tests run in complete isolation and cleans up artifacts automatically, preventing permission errors or stale data from previous runs.try/exceptblocks aroundrippleandlsstimports to allow the script to fail gracefully or skip specific checks if the environment is not fully configured._detect_instrument) exist before attempting to test them, preventing crashes during refactors.Testing
python run_tests.py 1-4and verify the runner does not ask to continue after the last test.python run_tests.py invalid-inputto verify the script handles errors without crashing.