2016-06-03 23:53:56 -04:00
|
|
|
'''Test idlelib.configHandler.
|
2014-07-14 23:07:32 -04:00
|
|
|
|
2016-06-03 23:53:56 -04:00
|
|
|
Coverage: 46% just by creating dialog.
|
|
|
|
The other half is code for working with user customizations.
|
2014-07-14 23:07:32 -04:00
|
|
|
'''
|
|
|
|
import unittest
|
|
|
|
from test.support import requires
|
|
|
|
from tkinter import Tk
|
|
|
|
from idlelib.configDialog import ConfigDialog
|
|
|
|
from idlelib.macosxSupport import _initializeTkVariantTests
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigDialogTest(unittest.TestCase):
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def setUpClass(cls):
|
|
|
|
requires('gui')
|
|
|
|
cls.root = Tk()
|
|
|
|
_initializeTkVariantTests(cls.root)
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def tearDownClass(cls):
|
2016-06-03 23:53:56 -04:00
|
|
|
cls.root.update_idletasks()
|
2014-07-14 23:07:32 -04:00
|
|
|
cls.root.destroy()
|
|
|
|
del cls.root
|
|
|
|
|
|
|
|
def test_dialog(self):
|
2016-06-03 23:53:56 -04:00
|
|
|
d = ConfigDialog(self.root, 'Test', _utest=True)
|
2016-05-16 22:27:28 -04:00
|
|
|
d.remove_var_callbacks()
|
2014-07-14 23:07:32 -04:00
|
|
|
d.destroy()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main(verbosity=2)
|