Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally

lost that tests are sorted by name before being run.  ``DocTestFinder``
has been changed to sort the list of tests it returns.
This commit is contained in:
Tim Peters 2006-07-27 23:44:37 +00:00
parent 00decd7835
commit 6f6814706e
3 changed files with 11 additions and 7 deletions

View file

@ -821,6 +821,11 @@ class DocTestFinder:
# Recursively expore `obj`, extracting DocTests.
tests = []
self._find(tests, obj, name, module, source_lines, globs, {})
# Sort the tests by alpha order of names, for consistency in
# verbose-mode output. This was a feature of doctest in Pythons
# <= 2.3 that got lost by accident in 2.4. It was repaired in
# 2.4.4 and 2.5.
tests.sort()
return tests
def _from_module(self, module, object):