diff options
-rw-r--r-- | Lib/idlelib/configSectionNameDialog.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/idle_test/test_config_name.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/configSectionNameDialog.py b/Lib/idlelib/configSectionNameDialog.py index c5c7f4e..b05e38e 100644 --- a/Lib/idlelib/configSectionNameDialog.py +++ b/Lib/idlelib/configSectionNameDialog.py @@ -91,7 +91,7 @@ class GetCfgSectionNameDialog(Toplevel): if __name__ == '__main__': import unittest unittest.main('idlelib.idle_test.test_config_name', verbosity=2, exit=False) - + # also human test the dialog root = Tk() def run(): diff --git a/Lib/idlelib/idle_test/test_config_name.py b/Lib/idlelib/idle_test/test_config_name.py index 579bf77..1546d2f 100644 --- a/Lib/idlelib/idle_test/test_config_name.py +++ b/Lib/idlelib/idle_test/test_config_name.py @@ -24,7 +24,7 @@ showerror = Mbox.showerror class TestConfigName(unittest.TestCase): dialog = Dummy_name_dialog() - + @classmethod def setUpClass(cls): name_dialog_module.tkMessageBox = Mbox @@ -38,13 +38,13 @@ class TestConfigName(unittest.TestCase): self.assertEqual(self.dialog.name_ok(), '') self.assertEqual(showerror.title, 'Name Error') self.assertIn('No', showerror.message) - + def test_used_name(self): self.dialog.name.set('used') self.assertEqual(self.dialog.name_ok(), '') self.assertEqual(showerror.title, 'Name Error') self.assertIn('use', showerror.message) - + def test_long_name(self): self.dialog.name.set('good'*8) self.assertEqual(self.dialog.name_ok(), '') @@ -56,7 +56,7 @@ class TestConfigName(unittest.TestCase): showerror.title = 'No Error' # should not be called self.assertEqual(self.dialog.name_ok(), 'good') self.assertEqual(showerror.title, 'No Error') - + def test_ok(self): self.dialog.destroyed = False self.dialog.name.set('good') @@ -69,7 +69,7 @@ class TestConfigName(unittest.TestCase): self.dialog.Cancel() self.assertEqual(self.dialog.result, '') self.assertTrue(self.dialog.destroyed) - + if __name__ == '__main__': unittest.main(verbosity=2, exit=False) |