Ejemplo n.º 1
0
    def test_reload_app_script_windows(self, plat, run):
        from mydevoirs.app import subprocess as sb

        sb.STARTUPINFO = MagicMock()
        app = MyDevoirsApp()
        app.stop = MagicMock()
        app._reload_app()
        assert run.call_args_list == [
            call(
                [sys.executable, "-m", "mydevoirs"],
                cwd=os.getcwd(),
            )
        ]
        assert app.stop.called
Ejemplo n.º 2
0
 def test_reload_app_script_linux(self, plat, run):
     app = MyDevoirsApp()
     app.stop = MagicMock()
     app._reload_app()
     assert run.call_args_list == [call(["/here/it/is/appimage"])]
     assert app.stop.called