We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cacafba commit 38f1d19Copy full SHA for 38f1d19
tests/test_accepts.py
@@ -53,6 +53,12 @@ def func6(**kwargs):
53
54
self.func6 = func6
55
56
+ @accepts(arg2=float)
57
+ def func7(arg1, arg2):
58
+ return arg1, arg2
59
+
60
+ self.func7 = func7
61
62
@accepts(bool)
63
def func_with_doc():
64
"""TEST_DOCSTRING"""
@@ -73,6 +79,9 @@ def test_positional_args(self):
73
79
args = int(), int()
74
80
result = self.func1(*args)
75
81
self.assertEqual(args + (3, 4), result)
82
+ args = str(), float()
83
+ result = self.func7(*args)
84
+ self.assertEqual(args, result)
76
85
# First argument is invalid.
77
86
args = str(), float(), str(), int()
78
87
self.assertRaises(ArgumentValidationError, self.func1, *args)
0 commit comments