Changes between Initial Version and Version 1 of Ticket #32641


Ignore:
Timestamp:
Apr 13, 2021, 2:51:47 AM (4 years ago)
Author:
Chris Jerdonek
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32641 – Description

    initial v1  
    11Currently, when running tests with `DiscoverRunner`, the number of tests is displayed only at the very end of the test run.
    22
    3 However, knowing this number at the ''beginning'' of a test run could I think provide an increase in usability. For example, you'd be able to notice right away if a new test you're working was or wasn't included as expected, based on whether the number is the same or different from the previous run. Similarly, the early feedback would be helpful as a sanity check if you're trying to reduce the number of tests using different command-line options, and you're not sure if your invocation is correct.
     3However, knowing this number at the ''beginning'' of a test run could I think provide an increase in usability. For example, you'd be able to notice right away if a new test you're working on was or wasn't included as expected, based on whether the number is the same or different from the previous run. Similarly, the early feedback would be helpful as a sanity check if you're trying to reduce the number of tests using different command-line options, and you're not sure if your invocation is correct.
    44
    55Thus, I'd like to suggest that `DiscoverRunner` display by default the number of tests discovered (and that match any filters) at the earliest point where this is known. This could be done inside `DiscoverRunner.build_suite()`.
     
    1818-        all_tests = reorder_tests(all_tests, test_types, self.reverse)
    1919+        all_tests = list(reorder_tests(all_tests, test_types, self.reverse))
    20 +        print('Found %d tests' % len(all_tests))
     20+        if self.verbosity >= 1:
     21+            print('Found %d tests' % len(all_tests))
    2122         suite = self.test_suite(all_tests)
    2223 
Back to Top