|
1 |
| -'''idlelib.idle_test is a private implementation of test.test_idle, |
2 |
| -which tests the IDLE application as part of the stdlib test suite. |
3 |
| -Run IDLE tests alone with "python -m test.test_idle". |
4 |
| -Starting with Python 3.6, IDLE requires tcl/tk 8.5 or later. |
| 1 | +"""idlelib.idle_test implements test.test_idle, which tests the IDLE |
| 2 | +application as part of the stdlib test suite. |
| 3 | +Run IDLE tests alone with "python -m test.test_idle (-v)". |
5 | 4 |
|
6 | 5 | This package and its contained modules are subject to change and
|
7 | 6 | any direct use is at your own risk.
|
8 |
| -''' |
| 7 | +""" |
9 | 8 | from os.path import dirname
|
10 | 9 |
|
| 10 | +# test_idle imports load_tests for test discovery (default all). |
| 11 | +# To run subsets of idlelib module tests, insert '[<chars>]' after '_'. |
| 12 | +# Example: insert '[ac]' for modules beginning with 'a' or 'c'. |
| 13 | +# Additional .discover/.addTest pairs with separate inserts work. |
| 14 | +# Example: pairs with 'c' and 'g' test c* files and grep. |
| 15 | + |
11 | 16 | def load_tests(loader, standard_tests, pattern):
|
12 | 17 | this_dir = dirname(__file__)
|
13 | 18 | top_dir = dirname(dirname(this_dir))
|
14 |
| - package_tests = loader.discover(start_dir=this_dir, pattern='test*.py', |
| 19 | + module_tests = loader.discover(start_dir=this_dir, |
| 20 | + pattern='test_*.py', # Insert here. |
15 | 21 | top_level_dir=top_dir)
|
16 |
| - standard_tests.addTests(package_tests) |
| 22 | + standard_tests.addTests(module_tests) |
| 23 | +## module_tests = loader.discover(start_dir=this_dir, |
| 24 | +## pattern='test_*.py', # Insert here. |
| 25 | +## top_level_dir=top_dir) |
| 26 | +## standard_tests.addTests(module_tests) |
17 | 27 | return standard_tests
|
0 commit comments