diff options
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/utils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index c1bfc87fc0..e977db8a10 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -235,9 +235,13 @@ def setup_databases( return old_names -def iter_test_cases(suite): - """Return an iterator over a test suite's unittest.TestCase objects.""" - for test in suite: +def iter_test_cases(tests): + """ + Return an iterator over a test suite's unittest.TestCase objects. + + The tests argument can also be an iterable of TestCase objects. + """ + for test in tests: if isinstance(test, TestCase): yield test else: |
