Skip to content

Commit 9c7e7b5

Browse files
committed
Revert "Always print 'NO TEST RUN' as a result if any test did not run"
This reverts commit 2272ba8.
1 parent 2272ba8 commit 9c7e7b5

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

Lib/test/libregrtest/main.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -460,28 +460,22 @@ def display_header(self):
460460
% (locale.getpreferredencoding(False),
461461
sys.getfilesystemencoding()))
462462

463-
def only_test_that_did_not_run(self):
464-
465-
return (self.run_no_tests and
466-
not any((self.good, self.bad, self.skipped,
467-
self.interrupted, self.environment_changed)))
468-
469463
def get_tests_result(self):
470464
result = []
471465
if self.bad:
472466
result.append("FAILURE")
473467
elif self.ns.fail_env_changed and self.environment_changed:
474468
result.append("ENV CHANGED")
469+
elif not any((self.good, self.bad, self.skipped, self.interrupted,
470+
self.environment_changed)):
471+
result.append("NO TEST RUN")
475472

476473
if self.interrupted:
477474
result.append("INTERRUPTED")
478475

479-
if not result and not self.only_test_that_did_not_run():
476+
if not result:
480477
result.append("SUCCESS")
481478

482-
if self.run_no_tests:
483-
result.append("NO TEST RUN")
484-
485479
result = ', '.join(result)
486480
if self.first_result:
487481
result = '%s then %s' % (self.first_result, result)

Lib/test/test_regrtest.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,11 @@ def list_regex(line_format, tests):
480480
result.append('ENV CHANGED')
481481
if interrupted:
482482
result.append('INTERRUPTED')
483-
484-
only_no_test_run = (no_test_ran and not any((good, failed, skipped,
485-
interrupted, env_changed)))
486-
487-
if not result and not only_no_test_run:
488-
result.append('SUCCESS')
489-
if no_test_ran:
483+
if not any((good, result, failed, interrupted, skipped,
484+
env_changed, fail_env_changed)):
490485
result.append("NO TEST RUN")
486+
elif not result:
487+
result.append('SUCCESS')
491488
result = ', '.join(result)
492489
if rerun:
493490
self.check_line(output, 'Tests result: %s' % result)

0 commit comments

Comments
 (0)