Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add progress trackers during test execution (#205)
* add a progress bar during test execution * allow for multiple styles; add inline style * cleanup progress trackers * respond to review comments; upgrade to Rich v10; add CLI help text and option compatibility checking * Minor styling changes * Fix merge issue * Rename private method since its used publicly now * move unparameterised test length determination inside find_number_of_instances * move test_cli to the right directory * max_dots_per_line needs to reset when we jump to a new line * switch order of printing new dot and end-of-line detection to fix double-printing end-of-line when the number of tests is equal to the max number of dots for the line * Adding docs for progress bar and inline test progress styles Co-authored-by: Darren Burns <darrenb900@gmail.com>
- Loading branch information
1 parent
e652a47
commit fb92d2e
Showing
9 changed files
with
490 additions
and
244 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from click.testing import CliRunner | ||
|
||
from ward import each, test | ||
from ward.run import run | ||
|
||
|
||
@test("Cannot use bar progress style with {output_style} output style") | ||
def _(output_style=each("dots-global", "dots-module")): | ||
runner = CliRunner() | ||
result = runner.invoke( | ||
run, ["test", "--progress-style", "bar", "--test-output-style", output_style] | ||
) | ||
|
||
assert result.exit_code == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.