api-engine-xin 0.0.29__tar.gz → 0.0.30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/script_runner.py +14 -3
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/PKG-INFO +1 -1
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/PKG-INFO +1 -1
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/setup.py +1 -1
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/__init__.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/core.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/__init__.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/assertion.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/base_case.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/exceptions.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/extractor.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/precondition.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/engine/replacer.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/http/__init__.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/http/client.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/http/files.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/__init__.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/case_log.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/db_client.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/global_func.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/suite_store.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/ApiEngine/infra/test_result.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/LICENSE +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/README.md +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/SOURCES.txt +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/dependency_links.txt +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/requires.txt +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/top_level.txt +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/setup.cfg +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/tests/Tools.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/tests/__init__.py +0 -0
- {api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/tests/runTest.py +0 -0
|
@@ -19,16 +19,27 @@ class ScriptRunner:
|
|
|
19
19
|
print = test_instance.print_log
|
|
20
20
|
test_instance.env = {}
|
|
21
21
|
|
|
22
|
+
# 显式 globals 命名空间,确保 import 语句和嵌套作用域(生成器表达式/lambda)正常工作
|
|
23
|
+
_namespace = {
|
|
24
|
+
"__builtins__": __builtins__,
|
|
25
|
+
"test": test,
|
|
26
|
+
"ENV": ENV,
|
|
27
|
+
"global_var": global_var,
|
|
28
|
+
"print": print,
|
|
29
|
+
"global_func": global_func,
|
|
30
|
+
"db": db,
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
# 执行前置脚本
|
|
23
34
|
setup_scripts = data.get("setup_script")
|
|
24
35
|
if setup_scripts and isinstance(setup_scripts, str):
|
|
25
|
-
exec(setup_scripts)
|
|
36
|
+
exec(setup_scripts, _namespace)
|
|
26
37
|
|
|
27
38
|
response = yield
|
|
28
39
|
|
|
29
|
-
#
|
|
40
|
+
# 执行后置脚本(复用 _namespace,保留前置脚本中 import 的模块和定义的变量)
|
|
30
41
|
teardown_scripts = data.get("teardown_script")
|
|
31
42
|
if teardown_scripts and isinstance(teardown_scripts, str):
|
|
32
|
-
exec(teardown_scripts)
|
|
43
|
+
exec(teardown_scripts, _namespace)
|
|
33
44
|
|
|
34
45
|
yield
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{api_engine_xin-0.0.29 → api_engine_xin-0.0.30}/api_engine_xin.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|