2016-06-04 03:58:37 +00:00
|
|
|
'''Test idlelib.configdialog.
|
2014-07-15 03:07:32 +00:00
|
|
|
|
2016-06-04 03:53:56 +00:00
|
|
|
Coverage: 46% just by creating dialog.
|
|
|
|
The other half is code for working with user customizations.
|
2014-07-15 03:07:32 +00:00
|
|
|
'''
|
2016-06-04 19:55:53 +00:00
|
|
|
from idlelib.configdialog import ConfigDialog # always test import
|
2014-07-15 03:07:32 +00:00
|
|
|
from test.support import requires
|
2016-06-04 19:54:44 +00:00
|
|
|
requires('gui')
|
2014-07-15 03:07:32 +00:00
|
|
|
from tkinter import Tk
|
2016-06-04 19:54:44 +00:00
|
|
|
import unittest
|
2014-07-15 03:07:32 +00:00
|
|
|
|
|
|
|
class ConfigDialogTest(unittest.TestCase):
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def setUpClass(cls):
|
|
|
|
cls.root = Tk()
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def tearDownClass(cls):
|
2016-06-04 03:53:56 +00:00
|
|
|
cls.root.update_idletasks()
|
2014-07-15 03:07:32 +00:00
|
|
|
cls.root.destroy()
|
|
|
|
del cls.root
|
|
|
|
|
|
|
|
def test_dialog(self):
|
2016-06-04 03:53:56 +00:00
|
|
|
d = ConfigDialog(self.root, 'Test', _utest=True)
|
2016-05-17 02:27:28 +00:00
|
|
|
d.remove_var_callbacks()
|
2014-07-15 03:07:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main(verbosity=2)
|