Skip to content
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

Behaviour of rich.progress on not terminated lines. #3316

Open
ml31415 opened this issue Mar 29, 2024 · 1 comment
Open

Behaviour of rich.progress on not terminated lines. #3316

ml31415 opened this issue Mar 29, 2024 · 1 comment

Comments

@ml31415
Copy link

ml31415 commented Mar 29, 2024

I have pytest running with pytest-sugar. For a couple of long running tests I'd like to use progress bars. Unfortunately, pytest-sugar doesn't terminate the lines, in order to keep adding to the same line. When the progress bar starts, the last line is overwritten. See the following code for a demonstrator. Is there some better way, to detect if the last line in the terminal is not terminated, so that the bar would start in its own line, while pytest output keeps untouched?

from rich.progress import track
print("unterminated line", end="")  # this line gets overwritten in the output
list(track(range(10)))
Copy link

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant