mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Restore original sys.path when running TTK tests
This commit is contained in:
parent
e363b1434d
commit
7df72dcdf9
3 changed files with 33 additions and 8 deletions
|
|
@ -7,13 +7,13 @@ test_support.import_module('_tkinter')
|
|||
|
||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test'))
|
||||
if lib_tk_test not in sys.path:
|
||||
sys.path.append(lib_tk_test)
|
||||
|
||||
import runtktests
|
||||
with test_support.DirsOnSysPath(lib_tk_test):
|
||||
import runtktests
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(
|
||||
with test_support.DirsOnSysPath(lib_tk_test):
|
||||
test_support.run_unittest(
|
||||
*runtktests.get_tests(gui=False, packages=['test_ttk']))
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue