Fred Drake | bb7c144 | 2004-06-15 15:49:46 +0000 | [diff] [blame] | 1 | """Tests for distutils. |
| 2 | |
| 3 | The tests for distutils are defined in the distutils.tests package; |
| 4 | the test_suite() function there returns a test suite that's ready to |
| 5 | be run. |
| 6 | """ |
| 7 | |
| 8 | import distutils.tests |
| 9 | import test.test_support |
Ezio Melotti | ef49096 | 2010-01-31 11:46:54 +0000 | [diff] [blame] | 10 | import warnings |
Fred Drake | bb7c144 | 2004-06-15 15:49:46 +0000 | [diff] [blame] | 11 | |
| 12 | |
| 13 | def test_main(): |
Ezio Melotti | ef49096 | 2010-01-31 11:46:54 +0000 | [diff] [blame] | 14 | with warnings.catch_warnings(): |
| 15 | warnings.filterwarnings("ignore", |
| 16 | "distutils.sysconfig.\w+ is deprecated", |
| 17 | DeprecationWarning) |
| 18 | test.test_support.run_unittest(distutils.tests.test_suite()) |
Antoine Pitrou | cb17010 | 2009-10-27 20:20:41 +0000 | [diff] [blame] | 19 | test.test_support.reap_children() |
Fred Drake | bb7c144 | 2004-06-15 15:49:46 +0000 | [diff] [blame] | 20 | |
| 21 | |
| 22 | if __name__ == "__main__": |
| 23 | test_main() |