source: vendor/python/2.5/Lib/test/test_unittest.py@ 3225

Last change on this file since 3225 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 779 bytes
Line 
1"""Test script for unittest.
2
3This just includes tests for new features. We really need a
4full set of tests.
5"""
6
7import unittest
8
9def test_TestSuite_iter():
10 """
11 >>> test1 = unittest.FunctionTestCase(lambda: None)
12 >>> test2 = unittest.FunctionTestCase(lambda: None)
13 >>> suite = unittest.TestSuite((test1, test2))
14 >>> tests = []
15 >>> for test in suite:
16 ... tests.append(test)
17 >>> tests == [test1, test2]
18 True
19 """
20
21
22######################################################################
23## Main
24######################################################################
25
26def test_main():
27 from test import test_support, test_unittest
28 test_support.run_doctest(test_unittest, verbosity=True)
29
30if __name__ == '__main__':
31 test_main()
Note: See TracBrowser for help on using the repository browser.