| Line | |
|---|
| 1 | """Test script for unittest.
|
|---|
| 2 |
|
|---|
| 3 | This just includes tests for new features. We really need a
|
|---|
| 4 | full set of tests.
|
|---|
| 5 | """
|
|---|
| 6 |
|
|---|
| 7 | import unittest
|
|---|
| 8 |
|
|---|
| 9 | def 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 |
|
|---|
| 26 | def test_main():
|
|---|
| 27 | from test import test_support, test_unittest
|
|---|
| 28 | test_support.run_doctest(test_unittest, verbosity=True)
|
|---|
| 29 |
|
|---|
| 30 | if __name__ == '__main__':
|
|---|
| 31 | test_main()
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.