def main(): app = QApplication(sys.argv) app.setWindowIcon(QIcon(ROOT + RES + ICONS + LOGO)) gui = GUI() if gui.config.plastique(): app.setStyle(STYLE) gui.show() sys.exit(app.exec_())
def _get_gui(qtbot): w = GUI(under_test=True) qtbot.addWidget(w) with qtbot.waitExposed(w): w.show() return w
def gui(qtbot): w = GUI(under_test=True) qtbot.addWidget(w) qtbot.waitForWindowShown(w) return w
def test_gui(self): window = tk.Tk() gui = GUI(window, 7) self.assertEqual(gui.block_size, 7) self.assertIsNone(gui.image_path) self.assertEqual(window.title(), 'Image-Scanner')