PATH:
lib64
/
python2.7
/
idlelib
/
idle_test
'''Test idlelib.help_about. Coverage: ''' from idlelib import aboutDialog as help_about from idlelib import textView as textview from idlelib.idle_test.mock_idle import Func from idlelib.idle_test.mock_tk import Mbox import unittest About = help_about.AboutDialog class Dummy_about_dialog(): # Dummy class for testing file display functions. idle_credits = About.ShowIDLECredits.im_func idle_readme = About.ShowIDLEAbout.im_func idle_news = About.ShowIDLENEWS.im_func # Called by the above display_file_text = About.display_file_text.im_func 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_view = textview.view_text cls.mbox = Mbox() cls.view = Func() textview.tkMessageBox = cls.mbox textview.view_text = cls.view cls.About = Dummy_about_dialog() @classmethod def tearDownClass(cls): textview.tkMessageBox = cls.orig_mbox textview.view_text = cls.orig_view.im_func 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.view.called = False handler() self.assertEqual(self.mbox.showerror.message, '') self.assertEqual(self.view.called, True) if __name__ == '__main__': unittest.main(verbosity=2)
[+]
..
[-] test_delegator.pyo
[edit]
[-] test_text.pyc
[edit]
[-] test_parenmatch.pyo
[edit]
[-] __init__.pyo
[edit]
[-] test_parenmatch.py
[edit]
[-] test_pathbrowser.pyc
[edit]
[-] test_warning.py
[edit]
[-] test_calltips.pyc
[edit]
[-] test_config_name.pyo
[edit]
[-] test_searchengine.pyo
[edit]
[-] mock_idle.pyc
[edit]
[-] htest.pyc
[edit]
[-] test_delegator.pyc
[edit]
[-] test_formatparagraph.py
[edit]
[-] mock_tk.pyc
[edit]
[-] mock_idle.pyo
[edit]
[-] test_searchdialogbase.pyc
[edit]
[-] test_searchdialogbase.pyo
[edit]
[-] test_hyperparser.py
[edit]
[-] test_searchengine.py
[edit]
[-] test_io.py
[edit]
[-] test_io.pyc
[edit]
[-] test_configdialog.pyc
[edit]
[-] test_textview.py
[edit]
[-] test_editmenu.py
[edit]
[-] test_helpabout.py
[edit]
[-] __init__.pyc
[edit]
[-] test_calltips.py
[edit]
[-] test_idlehistory.py
[edit]
[-] test_widgetredir.pyc
[edit]
[-] test_config_name.py
[edit]
[-] test_delegator.py
[edit]
[-] test_rstrip.pyc
[edit]
[-] __init__.py
[edit]
[-] test_searchengine.pyc
[edit]
[-] test_editmenu.pyc
[edit]
[-] test_configdialog.pyo
[edit]
[-] test_hyperparser.pyo
[edit]
[-] htest.py
[edit]
[-] test_warning.pyc
[edit]
[-] test_helpabout.pyc
[edit]
[-] test_grep.pyc
[edit]
[-] test_rstrip.py
[edit]
[-] mock_tk.pyo
[edit]
[-] test_pathbrowser.py
[edit]
[-] test_autoexpand.pyc
[edit]
[-] test_widgetredir.pyo
[edit]
[-] test_autocomplete.pyo
[edit]
[-] test_autoexpand.py
[edit]
[-] README.txt
[edit]
[-] test_formatparagraph.pyc
[edit]
[-] test_idlehistory.pyo
[edit]
[-] test_pathbrowser.pyo
[edit]
[-] test_autocomplete.py
[edit]
[-] test_warning.pyo
[edit]
[-] test_text.pyo
[edit]
[-] test_io.pyo
[edit]
[-] test_helpabout.pyo
[edit]
[-] test_textview.pyo
[edit]
[-] test_formatparagraph.pyo
[edit]
[-] htest.pyo
[edit]
[-] test_editmenu.pyo
[edit]
[-] test_idlehistory.pyc
[edit]
[-] test_grep.pyo
[edit]
[-] test_calltips.pyo
[edit]
[-] test_widgetredir.py
[edit]
[-] test_hyperparser.pyc
[edit]
[-] test_autoexpand.pyo
[edit]
[-] test_config_name.pyc
[edit]
[-] test_autocomplete.pyc
[edit]
[-] test_parenmatch.pyc
[edit]
[-] test_rstrip.pyo
[edit]
[-] mock_idle.py
[edit]
[-] test_text.py
[edit]
[-] test_grep.py
[edit]
[-] test_searchdialogbase.py
[edit]
[-] test_configdialog.py
[edit]
[-] mock_tk.py
[edit]
[-] test_textview.pyc
[edit]