def test_convert_func_calling():
from benchmark.convert2r import GOClass2RConverter
count = 0
notok = 0
for name, klass in goclass():
print('Calling function: {0}'.format(name))
count += 1
try:
gocc = GOClass2RConverter(klass)
#with nostdout():
res = gocc.fun(gocc.xglob)
npt.assert_almost_equal(gocc.fglob, res[0], decimal=4)
except Exception as e:
print(e)
notok += 1
continue
print("R func call that failed: {0} ratio: {1}".format(notok, (count-notok)*100/count))
评论列表
文章目录