def test_caches_js_processes(mocker):
    sandboxjs.exec_js_process("7", context="{}")

    mocked_new_js_proc = mocker.patch("cwltool.sandboxjs.new_js_proc")
    sandboxjs.exec_js_process("7", context="{}")

    mocked_new_js_proc.assert_not_called()
예제 #2
0
    def test_caches_js_processes(self):
        exec_js_process("7", context="{}")

        with patch("cwltool.sandboxjs.new_js_proc",
                   new=Mock(wraps=cwltool.sandboxjs.new_js_proc)) as mock:
            exec_js_process("7", context="{}")
            mock.assert_not_called()
예제 #3
0
def test_caches_js_processes(mocker):
    sandboxjs.exec_js_process("7", context="{}")

    mocked_new_js_proc = mocker.patch("cwltool.sandboxjs.new_js_proc")
    sandboxjs.exec_js_process("7", context="{}")

    mocked_new_js_proc.assert_not_called()