1 '''Unittests for idlelib/configHandler.py 2 3 Coverage: 46% just by creating dialog. The other half is change code. 4 5 ''' 6 import unittest 7 from test.test_support import requires 8 from Tkinter import Tk 9 from idlelib.configDialog import ConfigDialog 10 from idlelib.macosxSupport import _initializeTkVariantTests 11 12 13 class 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 32 if __name__ == '__main__': 33 unittest.main(verbosity=2) 34