1'''Unittests for idlelib/configHandler.py 2 3Coverage: 46% just by creating dialog. The other half is change code. 4 5''' 6import unittest 7from test.test_support import requires 8from Tkinter import Tk 9from idlelib.configDialog import ConfigDialog 10from idlelib.macosxSupport import _initializeTkVariantTests 11 12 13class ConfigDialogTest(unittest.TestCase): 14 15 @classmethod 16 def setUpClass(cls): 17 requires('gui') 18 cls.root = Tk() 19 cls.root.withdraw() 20 _initializeTkVariantTests(cls.root) 21 22 @classmethod 23 def tearDownClass(cls): 24 cls.root.destroy() 25 del cls.root 26 27 def test_dialog(self): 28 d = ConfigDialog(self.root, 'Test', _utest=True) 29 d.remove_var_callbacks() 30 31 32if __name__ == '__main__': 33 unittest.main(verbosity=2) 34