- Notifications
You must be signed in to change notification settings - Fork112
Tests: Improve shell interoperability#577
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sourcery-aibot commentedFeb 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 yourdashboard to:
Getting Help
|
codecovbot commentedFeb 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 toac631e0Comparewhy: Tests were failing when using fish shell due to prompt differenceswhat:- 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 initializationwhat:- 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 shellreadiness, handle environment variables consistently, prevent shell-specificprompt 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 to82da140Compare0188aed toea5b0c4Compare
Uh oh!
There was an error while loading.Please reload this page.
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_COMMANDandPS1to set a consistent prompt across shells.