Skip to content

Commit f179814

Browse files
committed
added hint about -v
1 parent c12767f commit f179814

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

python_tool_competition_2024/cli/run_command.py

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def run(
7979
targets = find_targets(config)
8080
results = calculate_results(targets, config)
8181
report(results, console, config)
82+
if not config.show_failures and (
83+
results.generation_results.total != results.generation_results.successful
84+
):
85+
console.print("Add -v to show the failed generation results.")
8286

8387

8488
def _extend_help(command: click.Command, extend_with: str) -> None:

tests/cli/test_run.py

+5
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def test_run_in_wd_with_all_failures(wd_tmp_path: Path) -> None:
157157
├─────────────────────────┼─────────┼───────────────┼─────────────────┼────────────────┤
158158
│ Total │ 0.00 % │ 42.50 % │ 50.00 % │ 21.00 % │
159159
└─────────────────────────┴─────────┴───────────────┴─────────────────┴────────────────┘
160+
Add -v to show the failed generation results.
160161
""".splitlines(),
161162
)
162163

@@ -201,6 +202,7 @@ def test_run_in_wd_with_all_exceptions(wd_tmp_path: Path) -> None:
201202
├─────────────────────────┼─────────┼───────────────┼─────────────────┼────────────────┤
202203
│ Total │ 0.00 % │ 42.50 % │ 50.00 % │ 21.00 % │
203204
└─────────────────────────┴─────────┴───────────────┴─────────────────┴────────────────┘
205+
Add -v to show the failed generation results.
204206
""".splitlines(),
205207
)
206208

@@ -262,6 +264,7 @@ def test_run_with_different_targets(wd_tmp_path: Path) -> None:
262264
├─────────────────────────┼─────────┼───────────────┼─────────────────┼────────────────┤
263265
│ Total │ 50.00 % │ 42.50 % │ 50.00 % │ 21.00 % │
264266
└─────────────────────────┴─────────┴───────────────┴─────────────────┴────────────────┘
267+
Add -v to show the failed generation results.
265268
""".splitlines(),
266269
)
267270

@@ -313,6 +316,7 @@ def test_run_with_real_tests(wd_tmp_path: Path) -> None:
313316
├─────────────────────────┼─────────┼───────────────┼─────────────────┼────────────────┤
314317
│ Total │ 50.00 % │ 38.89 % │ 16.67 % │ 45.45 % │
315318
└─────────────────────────┴─────────┴───────────────┴─────────────────┴────────────────┘
319+
Add -v to show the failed generation results.
316320
""".splitlines(),
317321
)
318322

@@ -444,6 +448,7 @@ def test_run_with_different_targets_and_results(wd_tmp_path: Path) -> None:
444448
├─────────────────────────┼─────────┼───────────────┼─────────────────┼────────────────┤
445449
│ Total │ 50.00 % │ 0.00 % │ 0.00 % │ 0.00 % │
446450
└─────────────────────────┴─────────┴───────────────┴─────────────────┴────────────────┘
451+
Add -v to show the failed generation results.
447452
""".splitlines(),
448453
)
449454

0 commit comments

Comments
 (0)