fixed show-timing work when no tty attached #1165
Open
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.
By default behave uses pretty formatter, it can write in 2 stream types - tty or simple character device, for example simple file or pipe.
Common logic of processing steps described here
If stream is tty character device. Firstly it prints step during matching phase (just only parsed step from feature file without additional data), then step executes and writes additional data like step status, duration and then it rewrites last line in terminal with latest data.
If steam is NOT tty (file or pipe). It prints step information only during matching phase and doesn't rewrite it during execution phase.
This PR should change behavior.
If stream is not tty character device then print step information skips during match phase and prints after execution phase.