#32489: Add a generator function in runner.py to iterate over a test suite's
test
cases
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: test | Triage Stage:
suite,iterator, | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Chris Jerdonek):
If the function were implemented recursively, I think it could be
something like this (untested):
{{{#!python
def iter_test_cases(suite):
suite_class = type(suite)
for test in suite:
if isinstance(test, suite_class):
yield from iter_test_cases(suite)
else:
yield test
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32489#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.eb480c2dce36061188d6242ad0519c8a%40djangoproject.com.