We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 200d4c2 commit b04c182Copy full SHA for b04c182
tests/compile/function/test_function.py
@@ -54,6 +54,22 @@ def test_function_name():
54
assert regex.match(func.name) is not None
55
56
57
+def test_trust_empty_input():
58
+ x = shared(1)
59
+ f = function([], x + 1)
60
+ assert f.trust_input is True
61
+
62
63
+def test_trust_input():
64
+ x = dvector()
65
+ y = shared(1)
66
+ z = x + y
67
+ f = function([x], z)
68
+ assert f.trust_input is False
69
+ f = function([x], z, trust_input=True)
70
71
72
73
class TestFunctionIn:
74
def test_in_strict(self):
75
a = dvector()
0 commit comments