1'''idlelib.idle_test is a private implementation of test.test_idle,
2which tests the IDLE application as part of the stdlib test suite.
3Run IDLE tests alone with "python -m test.test_idle".
4This package and its contained modules are subject to change and
5any direct use is at your own risk.
6'''
7from os.path import dirname
8
9def load_tests(loader, standard_tests, pattern):
10    this_dir = dirname(__file__)
11    top_dir = dirname(dirname(this_dir))
12    package_tests = loader.discover(start_dir=this_dir, pattern='test*.py',
13                                    top_level_dir=top_dir)
14    standard_tests.addTests(package_tests)
15    return standard_tests
16