Explorar el Código

test: add unit test for running gui and core

trgiangdo hace 1 año
padre
commit
34f826aa30
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      tests/test_run.py

+ 8 - 0
tests/test_run.py

@@ -53,3 +53,11 @@ def test_run_pass_with_gui_and_rest(core_run, rest_run, gui_run):
     gui_run.assert_called_once()
     core_run.assert_called_once()
     rest_run.assert_not_called()
+
+
+@mock.patch("taipy.gui.Gui.run")
+@mock.patch("taipy.core.Core.run")
+def test_run_pass_with_gui_and_core(core_run, gui_run):
+    _run(Gui(), Core())
+    gui_run.assert_called_once()
+    core_run.assert_called_once()