def test_missing_inputs(self):
def fn():
x, s = T.scalars('xs')
function([], [x])
checkfor(self, fn, MissingInputError)
def fn():
x, s = T.scalars('xs')
# Ignore unused input s, as it hides the other error
function([s], [x], on_unused_input='ignore')
checkfor(self, fn, MissingInputError)
def fn():
x, s = T.scalars('xs')
function([s], [x])
checkfor(self, fn, UnusedInputError)
def fn():
x, s = T.scalars('xs')
# Ignore unused input s, as it hides the other error
function([s], x, on_unused_input='ignore')
checkfor(self, fn, MissingInputError)
def fn():
x, s = T.scalars('xs')
function([s], x)
checkfor(self, fn, UnusedInputError)
def fn():
x, s = T.scalars('xs')
# Ignore unused input s, as it hides the other error
function([s], Out(x), on_unused_input='ignore')
checkfor(self, fn, MissingInputError)
def fn():
x, s = T.scalars('xs')
function([s], Out(x))
checkfor(self, fn, UnusedInputError)
def fn():
x, s = T.scalars('xs')
function([In(x, update=s + x)], x)
checkfor(self, fn, MissingInputError)
def fn():
x, s = T.scalars('xs')
function([In(x, update=((s * s) + x))], x)
checkfor(self, fn, MissingInputError)
test_function_module.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录