summaryrefslogtreecommitdiff
path: root/Lib/test/test_doctest.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-07-27 23:44:37 +0000
committerTim Peters <tim.peters@gmail.com>2006-07-27 23:44:37 +0000
commit6f6814706ea8158ae298244d1e127a8181f22479 (patch)
treebfe156390e6094f3df5b28ede148ed2e47c45fba /Lib/test/test_doctest.py
parent00decd7835f0c2488451cedc345f2fb0650378b5 (diff)
downloadcpython-git-6f6814706ea8158ae298244d1e127a8181f22479.tar.gz
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.
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r--Lib/test/test_doctest.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 01f7acd2f5..e8379c5dc4 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -419,7 +419,6 @@ methods, classmethods, staticmethods, properties, and nested classes.
>>> finder = doctest.DocTestFinder()
>>> tests = finder.find(SampleClass)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
3 SampleClass
@@ -435,7 +434,6 @@ methods, classmethods, staticmethods, properties, and nested classes.
New-style classes are also supported:
>>> tests = finder.find(SampleNewStyleClass)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
1 SampleNewStyleClass
@@ -475,7 +473,6 @@ functions, classes, and the `__test__` dictionary, if it exists:
>>> # ignoring the objects since they weren't defined in m.
>>> import test.test_doctest
>>> tests = finder.find(m, module=test.test_doctest)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
1 some_module
@@ -499,7 +496,6 @@ will only be generated for it once:
>>> from test import doctest_aliases
>>> tests = excl_empty_finder.find(doctest_aliases)
- >>> tests.sort()
>>> print len(tests)
2
>>> print tests[0].name
@@ -517,7 +513,6 @@ Empty Tests
By default, an object with no doctests doesn't create any tests:
>>> tests = doctest.DocTestFinder().find(SampleClass)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
3 SampleClass
@@ -536,7 +531,6 @@ is really to support backward compatibility in what doctest.master.summarize()
displays.
>>> tests = doctest.DocTestFinder(exclude_empty=False).find(SampleClass)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
3 SampleClass
@@ -557,7 +551,6 @@ DocTestFinder can be told not to look for tests in contained objects
using the `recurse` flag:
>>> tests = doctest.DocTestFinder(recurse=False).find(SampleClass)
- >>> tests.sort()
>>> for t in tests:
... print '%2s %s' % (len(t.examples), t.name)
3 SampleClass