Skip to content

Commit 38f1d19

Browse files
committed
Added test which brokes the logic of the accepts decorator
1 parent cacafba commit 38f1d19

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_accepts.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ def func6(**kwargs):
5353

5454
self.func6 = func6
5555

56+
@accepts(arg2=float)
57+
def func7(arg1, arg2):
58+
return arg1, arg2
59+
60+
self.func7 = func7
61+
5662
@accepts(bool)
5763
def func_with_doc():
5864
"""TEST_DOCSTRING"""
@@ -73,6 +79,9 @@ def test_positional_args(self):
7379
args = int(), int()
7480
result = self.func1(*args)
7581
self.assertEqual(args + (3, 4), result)
82+
args = str(), float()
83+
result = self.func7(*args)
84+
self.assertEqual(args, result)
7685
# First argument is invalid.
7786
args = str(), float(), str(), int()
7887
self.assertRaises(ArgumentValidationError, self.func1, *args)

0 commit comments

Comments
 (0)