Python单元测试
twoone-3 opened this issue · 3 comments
twoone-3 commented
请问如何配置python单元测试?
######## ScriptX config ##########
# 1. import ScriptX
# set which backend engine to use
set(SCRIPTX_BACKEND Python CACHE STRING "" FORCE)
我将test文件夹的cmake改成这样
结果编译时仍有v8的引用
配置cmake时我发现有仓库的克隆
但是文件里面我并没有发现git链接
就感觉很奇怪
LanderlYoung commented
跑单测需要依赖运行时,比如python的lib。这部分代码在单测工程的TestEnv相关的cmake里,可以参考一下V8,lua的配置
twoone-3 commented
看了下单元测试,python的设计就是eval和exec分开的,无论怎么样都无法和js的eval兼容,我的建议是加个engine::exec函数