-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: Improve shell interoperability #577
base: master
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThe pull request improves the reliability of the No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #577 +/- ##
=======================================
Coverage 79.83% 79.83%
=======================================
Files 22 22
Lines 1914 1914
Branches 294 294
=======================================
Hits 1528 1528
Misses 266 266
Partials 120 120 ☔ View full report in Codecov by Sentry. |
c11f0dc
to
ac631e0
Compare
why: Tests were failing when using fish shell due to prompt differences what: - Use PROMPT_COMMAND='' to clear shell-specific prompt commands - Set custom PS1='READY>' that works across shells - Add retry logic to wait for prompt and command output - Make assertions more flexible by checking content not exact matches
why: Test was flaky due to timing issues with shell initialization what: - Add small delay after window creation - Add error handling around capture_pane calls - Increase retry timeouts from 1s to 2s - Add more comprehensive output checks - Add check for non-empty pane contents
Add setup_shell_window helper function to standardize shell setup in tests: Set consistent shell environment and prompt, add robust waiting for shell readiness, handle environment variables consistently, prevent shell-specific prompt modifications. Update test_new_window_with_environment to use new helper: Add proper waiting for command output, fix linting issues with loop variables, make tests more reliable against timing issues.
ac631e0
to
82da140
Compare
Summary by Sourcery
Improve shell interoperability in tests by using a consistent prompt across shells and adding retry logic to wait for the shell to be ready and for the command output to be available before asserting the pane contents.
Tests:
PROMPT_COMMAND
andPS1
to set a consistent prompt across shells.