moved code for coherence
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from py_func.tm import _init_api, _remote_print
|
from py_func.tm import _init_api, _remote_print
|
||||||
from interpreter.utils.stdout_redirect import stdio_redir
|
from testium.interpreter.utils.stdout_redirect import stdio_redir
|
||||||
|
|
||||||
|
|
||||||
class TcpStdOut:
|
class TcpStdOut:
|
||||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
import importlib
|
import importlib
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from interpreter.utils.tum_except import ETUMRuntimeError, ETUMSyntaxError
|
from testium.interpreter.utils.tum_except import ETUMRuntimeError, ETUMSyntaxError
|
||||||
from py_func import tm
|
from py_func import tm
|
||||||
|
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@ import platform
|
|||||||
import math
|
import math
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
from interpreter.utils.jrpc import JsonRpcSrv
|
from testium.interpreter.utils.jrpc import JsonRpcSrv
|
||||||
from interpreter.utils.tum_except import ETUMRuntimeError, print_exception
|
from testium.interpreter.utils.tum_except import ETUMRuntimeError, print_exception
|
||||||
from py_func.func_call import func_exec
|
from py_func.func_call import func_exec
|
||||||
|
|
||||||
|
|
||||||
@@ -17,8 +17,8 @@ is raised.
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
from py_func.handle import FuncHandler
|
from py_func.handle import FuncHandler
|
||||||
from interpreter.utils.tum_except import ETUMRuntimeError
|
from testium.interpreter.utils.tum_except import ETUMRuntimeError
|
||||||
from interpreter.utils.api import SUPPORTED_API
|
from testium.interpreter.utils.api import SUPPORTED_API
|
||||||
|
|
||||||
thismodule = sys.modules[__name__]
|
thismodule = sys.modules[__name__]
|
||||||
# Shared FuncHandler instance used to forward API calls. Remains None
|
# Shared FuncHandler instance used to forward API calls. Remains None
|
||||||
@@ -14,7 +14,7 @@ from interpreter.utils.constants import TestItemType as cst
|
|||||||
|
|
||||||
|
|
||||||
class TestItemLuaFunc(TestItem):
|
class TestItemLuaFunc(TestItem):
|
||||||
"""py_func item usage.
|
"""lua_func item usage.
|
||||||
func file: func_file.py, func_name: func, param: [$(variable1), [1, 2, 3], true]
|
func file: func_file.py, func_name: func, param: [$(variable1), [1, 2, 3], true]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -54,9 +54,7 @@ def _is_python_interpreter(path: str, timeout=2) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def _sys_python_bin():
|
def _sys_python_bin():
|
||||||
sys_python_bin = tm.gd("_sys_python_bin", "")
|
sys_python_bin = ""
|
||||||
if sys_python_bin != "":
|
|
||||||
return sys_python_bin
|
|
||||||
|
|
||||||
cur_os = tm.OS()
|
cur_os = tm.OS()
|
||||||
if cur_os == "Windows":
|
if cur_os == "Windows":
|
||||||
@@ -73,7 +71,6 @@ def _sys_python_bin():
|
|||||||
sys_python_bin = ""
|
sys_python_bin = ""
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tm.setgd("_sys_python_bin", sys_python_bin)
|
|
||||||
return sys_python_bin
|
return sys_python_bin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user