浏览代码

test: add unit test for running gui and core

trgiangdo 1 年之前
父节点
当前提交
34f826aa30
共有 1 个文件被更改,包括 8 次插入0 次删除
  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()