mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #15392: Create a unittest framework for IDLE.
Preliminary patch by Rajagopalasarma Jayakrishnan.
This commit is contained in:
parent
ecf0851809
commit
db4e5c53c9
9 changed files with 118 additions and 2 deletions
14
Lib/test/test_idle.py
Normal file
14
Lib/test/test_idle.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Skip test if tkinter wasn't built or idlelib was deleted.
|
||||
from test.support import import_module
|
||||
import_module('tkinter') # discard return
|
||||
itdir = import_module('idlelib.idle_test')
|
||||
|
||||
# Without test_main present, regrtest.runtest_inner (line1219)
|
||||
# imitates unittest.main by calling
|
||||
# unittest.TestLoader().loadTestsFromModule(this_module)
|
||||
# which look for load_tests and uses it if found.
|
||||
load_tests = itdir.load_tests
|
||||
|
||||
if __name__ == '__main__':
|
||||
import unittest
|
||||
unittest.main(verbosity=2, exit=False)
|
Loading…
Add table
Add a link
Reference in a new issue