diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-11-06 13:01:15 -0800 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-11-06 13:01:15 -0800 |
commit | 1bcaf3a5f3cef733a03bd15dc30d60289959402b (patch) | |
tree | d606b56c2f0628b12e0b5a954f782689955de594 /Lib/idlelib/idle_test/test_config_key.py | |
parent | 4abfe80e5524cebcb6c493f7a67f2c2587715a69 (diff) | |
parent | bc82b552cc77e925e85c96b70df3bf3cafda1565 (diff) | |
download | cpython-1bcaf3a5f3cef733a03bd15dc30d60289959402b.tar.gz |
merge 3.5
Diffstat (limited to 'Lib/idlelib/idle_test/test_config_key.py')
-rw-r--r-- | Lib/idlelib/idle_test/test_config_key.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py new file mode 100644 index 0000000000..ee3f2c835c --- /dev/null +++ b/Lib/idlelib/idle_test/test_config_key.py @@ -0,0 +1,33 @@ +''' Test idlelib.config_key. + +Coverage: 56% from creating and closing dialog. +''' +from idlelib import config_key +from test.support import requires +requires('gui') +import unittest +from tkinter import Tk, Text + + +class GetKeysTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.root = Tk() + cls.root.withdraw() + + @classmethod + def tearDownClass(cls): + cls.root.update() # Stop "can't run event command" warning. + cls.root.destroy() + del cls.root + + + def test_init(self): + dia = config_key.GetKeysDialog( + self.root, 'test', '<<Test>>', ['<Key-F12>'], _utest=True) + dia.Cancel() + + +if __name__ == '__main__': + unittest.main(verbosity=2) |