summaryrefslogtreecommitdiffstats
path: root/Lib/unittest.py
diff options
context:
space:
mode:
authorJim Fulton <jim@zope.com>2004-08-28 15:22:12 (GMT)
committerJim Fulton <jim@zope.com>2004-08-28 15:22:12 (GMT)
commitfafd874bc8ae89a9c145e38d94cb14e628fcad34 (patch)
tree9fd466bb271a31a7535103ca73fabcac140de6c0 /Lib/unittest.py
parent9f556a408bfc0ea872cc2efbd86534ef46c5f42c (diff)
downloadcpython-fafd874bc8ae89a9c145e38d94cb14e628fcad34.zip
cpython-fafd874bc8ae89a9c145e38d94cb14e628fcad34.tar.gz
cpython-fafd874bc8ae89a9c145e38d94cb14e628fcad34.tar.bz2
Added an __iter__ method for test suites.
Diffstat (limited to 'Lib/unittest.py')
-rw-r--r--Lib/unittest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index 29d90e3..3375067 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -400,6 +400,9 @@ class TestSuite:
__str__ = __repr__
+ def __iter__(self):
+ return iter(self._tests)
+
def countTestCases(self):
cases = 0
for test in self._tests: