Changes between Initial Version and Version 1 of Ticket #32489


Ignore:
Timestamp:
Feb 27, 2021, 10:00:05 PM (4 years ago)
Author:
Chris Jerdonek
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32489 – Description

    initial v1  
    11There are four functions or methods in [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py test/runner.py] that need to iterate over a test suite's test cases:
    22
    3 * [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L684-L699 DiscoverRunner._get_databases()]
    4 * [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L792-L815 partition_suite_by_type()]
    5 * [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L818-L828 partition_suite_by_case()]
    6 * [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L831-L848 filter_tests_by_tags()]
     3* [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L684-L699 DiscoverRunner._get_databases(self, suite)]
     4* [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L792-L815 partition_suite_by_type(suite, classes, bins, reverse=False)]
     5* [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L818-L828 partition_suite_by_case(suite)]
     6* [https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/test/runner.py#L831-L848 filter_tests_by_tags(suite, tags, exclude_tags)]
    77
    88Each of these functions is a little harder to understand than it needs to be because each needs to contain the logic of how to iterate over a test suite, which isn't obvious. In particular, they're all implemented as recursive functions, since test suites can contain test suites.
Back to Top