-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
terminal: notify terminal emulator about test session progress #13728
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
base: main
Are you sure you want to change the base?
Conversation
The `write` method does some processing on the input, namely markup and adding to the current line. `write_raw` skips these parts. It is useful for emitting invisible escape sequences.
Return how many items have been reported in the progress so far. This cleans up the code a bit, but also allows grabbing this info without accessing the internals. We can consider making this property public separately.
Use OSC 9;4 ANSI sequences terminal progress to notify the terminal emulator about progress, so it can display it to the user (e.g. on the terminal tab). Fix pytest-dev#13072. Co-Authored-By: Anna Tasiopoulou <[email protected]>
This replaces PR #13395. While searching the web for OSC 9;4, I found some reports that this sequence conflicts with OSC 9 usage by the iTerm terminal emulator, which uses it for generating desktop notifications. So this might end up generating a bunch of notifications on such terminals... I will need to test if that is indeed the case. Though I don't have easy access to macOS so if someone's able to test it that would be appreciated :) For reference I tested it on:
|
For what it's worth, I can recommend Scaleway for this. They charge 0.11€/h for a Mac Mini you can access remotely, so you pay 2.64€ for the minimum of 24h to try something out. Could easily get it back after via our OpenCollective too. Only caveat is that you need to remember to disable it after 24h, because you can't do that in advance sadly. |
@bluetech could you include links to relevant docs/standards for future reference? |
@@ -0,0 +1,6 @@ | |||
Added support for displaying test session progress in the terminal tab using the OSC 9;4; ANSI sequence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be highlighted?
Added support for displaying test session progress in the terminal tab using the OSC 9;4; ANSI sequence. | |
Added support for displaying test session progress in the terminal tab using the ``OSC 9;4;`` ANSI sequence. |
Is https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC the canonical standard? |
Use OSC 9;4 ANSI sequences terminal progress to notify the terminal emulator about progress, so it can display it to the user (e.g. on the terminal tab).
Fix #13072.