last-failed: display skipped-files msg always
This commit is contained in:
parent
480dd9e6d6
commit
ff80464b47
|
@ -233,20 +233,16 @@ class LFPlugin(object):
|
||||||
items[:] = previously_failed + previously_passed
|
items[:] = previously_failed + previously_passed
|
||||||
|
|
||||||
noun = "failure" if self._previously_failed_count == 1 else "failures"
|
noun = "failure" if self._previously_failed_count == 1 else "failures"
|
||||||
|
suffix = " first" if self.config.getoption("failedfirst") else ""
|
||||||
|
self._report_status = "rerun previous {count} {noun}{suffix}".format(
|
||||||
|
count=self._previously_failed_count, suffix=suffix, noun=noun
|
||||||
|
)
|
||||||
|
|
||||||
if self._skipped_files > 0:
|
if self._skipped_files > 0:
|
||||||
files_noun = "file" if self._skipped_files == 1 else "files"
|
files_noun = "file" if self._skipped_files == 1 else "files"
|
||||||
skipped_files_msg = " (skipped {files} {files_noun})".format(
|
self._report_status += " (skipped {files} {files_noun})".format(
|
||||||
files=self._skipped_files, files_noun=files_noun
|
files=self._skipped_files, files_noun=files_noun
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
skipped_files_msg = ""
|
|
||||||
suffix = " first" if self.config.getoption("failedfirst") else ""
|
|
||||||
self._report_status = "rerun previous {count} {noun}{suffix}{skipped_files}".format(
|
|
||||||
count=self._previously_failed_count,
|
|
||||||
suffix=suffix,
|
|
||||||
noun=noun,
|
|
||||||
skipped_files=skipped_files_msg,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
self._report_status = "no previously failed tests, "
|
self._report_status = "no previously failed tests, "
|
||||||
if self.config.getoption("last_failed_no_failures") == "none":
|
if self.config.getoption("last_failed_no_failures") == "none":
|
||||||
|
|
|
@ -869,7 +869,7 @@ class TestLastFailed(object):
|
||||||
result.stdout.fnmatch_lines(
|
result.stdout.fnmatch_lines(
|
||||||
[
|
[
|
||||||
"collected 1 item",
|
"collected 1 item",
|
||||||
"run-last-failure: 1 known failures not in selected tests",
|
"run-last-failure: 1 known failures not in selected tests (skipped 1 file)",
|
||||||
"* 1 failed in *",
|
"* 1 failed in *",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue