2016-06-03 23:58:37 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'''Test idlelib.configdialog.
							 | 
						
					
						
							
								
									
										
										
										
											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
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'''
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-04 15:55:53 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								from idlelib.configdialog import ConfigDialog  # always test import
							 | 
						
					
						
							
								
									
										
										
										
											2014-07-14 23:07:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								from test.support import requires
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-04 15:54:44 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								requires('gui')
							 | 
						
					
						
							
								
									
										
										
										
											2014-07-14 23:07:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								from tkinter import Tk
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-04 15:54:44 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import unittest
							 | 
						
					
						
							
								
									
										
										
										
											2014-07-14 23:07:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class ConfigDialogTest(unittest.TestCase):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    @classmethod
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def setUpClass(cls):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        cls.root = Tk()
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-31 21:03:16 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        cls.root.withdraw()
							 | 
						
					
						
							
								
									
										
										
										
											2014-07-14 23:07:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    @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
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-07-10 17:28:10 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    def test_configdialog(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
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								if __name__ == '__main__':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    unittest.main(verbosity=2)
							 |