diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-06-22 09:49:15 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-06-22 09:49:15 (GMT) |
commit | 47e00e5c46ef458b1903ff75f2044ea29139cbc3 (patch) | |
tree | 0c43c7545f077c1cde368922946903a7ce0f9f8f /Lib | |
parent | ca183efdf47bb0f6433b297f3df60e535a7f10c3 (diff) | |
download | cpython-47e00e5c46ef458b1903ff75f2044ea29139cbc3.zip cpython-47e00e5c46ef458b1903ff75f2044ea29139cbc3.tar.gz cpython-47e00e5c46ef458b1903ff75f2044ea29139cbc3.tar.bz2 |
Issue #27365: Finish merge so tests pass.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/help_about.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/idle_test/test_help_about.py | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index 65d94fc..54f3599 100644 --- a/Lib/idlelib/help_about.py +++ b/Lib/idlelib/help_about.py @@ -146,6 +146,6 @@ class AboutDialog(Toplevel): if __name__ == '__main__': import unittest - unittest.main('idlelib.idle_test.test_helpabout', verbosity=2, exit=False) + unittest.main('idlelib.idle_test.test_help_about', verbosity=2, exit=False) from idlelib.idle_test.htest import run run(AboutDialog) diff --git a/Lib/idlelib/idle_test/test_help_about.py b/Lib/idlelib/idle_test/test_help_about.py index d0a0127..843efb9 100644 --- a/Lib/idlelib/idle_test/test_help_about.py +++ b/Lib/idlelib/idle_test/test_help_about.py @@ -2,10 +2,10 @@ Coverage: ''' -from idlelib import aboutDialog as help_about -from idlelib import textView as textview +from idlelib import help_about +from idlelib import textview from idlelib.idle_test.mock_idle import Func -from idlelib.idle_test.mock_tk import Mbox +from idlelib.idle_test.mock_tk import Mbox_func import unittest About = help_about.AboutDialog @@ -19,33 +19,33 @@ class Dummy_about_dialog(): class DisplayFileTest(unittest.TestCase): - "Test that .txt files are found and properly decoded." dialog = Dummy_about_dialog() @classmethod def setUpClass(cls): - cls.orig_mbox = textview.tkMessageBox + cls.orig_error = textview.showerror cls.orig_view = textview.view_text - cls.mbox = Mbox() + cls.error = Mbox_func() cls.view = Func() - textview.tkMessageBox = cls.mbox + textview.showerror = cls.error textview.view_text = cls.view cls.About = Dummy_about_dialog() @classmethod def tearDownClass(cls): - textview.tkMessageBox = cls.orig_mbox + textview.showerror = cls.orig_error textview.view_text = cls.orig_view def test_file_isplay(self): for handler in (self.dialog.idle_credits, self.dialog.idle_readme, self.dialog.idle_news): - self.mbox.showerror.message = '' + self.error.message = '' self.view.called = False - handler() - self.assertEqual(self.mbox.showerror.message, '') - self.assertEqual(self.view.called, True) + with self.subTest(handler=handler): + handler() + self.assertEqual(self.error.message, '') + self.assertEqual(self.view.called, True) if __name__ == '__main__': |