def setUp(self): GuiTestAssistant.setUp(self) self.app = make_sample_app() # Make a copy of the current recent_files and reset at tearDown so # opening new one will not be impacted by running the test suite. self.recent_files = copy(self.app.recent_files) self.app.recent_files = []
def test_create_app_rewrite_preference_file(self): before_prefs_file_stats = os.stat(get_preference_file()) # Make sure some time passes sleep(1) app = make_sample_app() # Make sure preference file was modified by the creation of the app after_prefs_file_stats = os.stat(get_preference_file()) self.assertNotAlmostEqual(before_prefs_file_stats.st_mtime, after_prefs_file_stats.st_mtime) app.exit()
def setUp(self): super(TestKromatographyAppHelpWindows, self).setUp() self.app = make_sample_app()
def _start_and_stop_gui_app(self, init_files=None, num_windows=0): self.app = make_sample_app(init_files) self.gui.invoke_after(GUI_DURATION, self.assert_and_stop_app(num_windows)) self.app.run()
def test_icon(self): app = make_sample_app() self.assertIsInstance(app.icon, ImageResource) self.assertIsInstance(app.splash_screen, SplashScreen) self.assertIsInstance(app.about_dialog, IAboutDialog) app.exit()
def setUp(self): self.app = make_sample_app()