Skip to content

Commit 4e99527

Browse files
committed
Fix signature of return_ and raise_
This is an oversight of patch 74c3c9b (Avoid `partial` when constructing answers). The catch all arguments we had because we used `partial` on the functions. Since we now don't there is no use for them. They look rather confusing, as if we the intention would be to eat all but the first argument. Hence, the cleanup.
1 parent 908c0fd commit 4e99527

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mockito/invocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,13 @@ def check_used(self):
405405
"\nUnused stub: %s" % self)
406406

407407

408-
def return_(value, *a, **kw):
409-
def answer(*a, **kw):
408+
def return_(value):
409+
def answer(*args, **kwargs):
410410
return value
411411
return answer
412412

413-
def raise_(exception, *a, **kw):
414-
def answer(*a, **kw):
413+
def raise_(exception):
414+
def answer(*args, **kwargs):
415415
raise exception
416416
return answer
417417

0 commit comments

Comments
 (0)