One benefit of this is that two of the helper functions that
`build_suite()` calls, namely `filter_tests_by_tags()` and
`reorder_suite()`, could be updated to operate on simple lists. This would
reduce the amount of code that needs to know about test suites and their
special handling.
For example, `filter_tests_by_tags()` could change from this:
{{{#!python
def filter_tests_by_tags(suite, tags, exclude_tags):
suite_class = type(suite)
return suite_class(
test for test in iter_test_cases(suite)
if test_match_tags(test, tags, exclude_tags)
)
}}}
to this:
{{{#!python
def filter_tests_by_tags(tests, tags, exclude_tags):
return [test for test in tests if test_match_tags(test, tags,
exclude_tags)]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32529>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/32529#comment:1>
* owner: nobody => Chris Jerdonek
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32529#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32529#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32529#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d828beb68f6b925217242e8f4faac2216f7c9c57" d828beb6]:
{{{
#!CommitTicketReference repository=""
revision="d828beb68f6b925217242e8f4faac2216f7c9c57"
Fixed #32529 -- Delayed creating a test suite in build_suite().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32529#comment:5>