def test_init(self): app = App() self.assertIs(app.app, app) self.assertTrue(isinstance(app.widget, tk.Tk)) self.assertIs(app.widget.element, app) self.assertEqual(app.getChildren(), []) self.assertFalse(app.isShown()) app.show(mainloop=False) self.assertTrue(app.isShown()) app.hide() self.assertFalse(app.isShown()) app.remove() self.assertEqual(False, app.isShown(error=False))
def test_states(self): app = App() self.assertEqual(False, app.isShown()) self.assertEqual(True, app.exists()) self.assertEqual(True, app.isPacked()) app.show(mainloop=False) self.assertEqual(True, app.isShown()) self.assertEqual(True, app.exists()) self.assertEqual(True, app.isPacked()) app.hide() self.assertEqual(False, app.isShown()) self.assertEqual(True, app.exists()) self.assertEqual(True, app.isPacked()) app.remove() self.assertEqual(False, app.isShown()) self.assertEqual(False, app.exists()) self.assertEqual(False, app.isPacked())