Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments.
diff --git a/mock.py b/mock.py
index 389a9cb..22654b8 100644
--- a/mock.py
+++ b/mock.py
@@ -175,6 +175,7 @@
regargs, varargs, varkw, defaults, kwonly, kwonlydef, ann = argspec
else:
try:
+ # not using annotations
regargs, varargs, varkwargs, defaults = inspect.getargspec(func)
except TypeError:
# C function / method, possibly inherited object().__init__
diff --git a/tests/testhelpers.py b/tests/testhelpers.py
index 792e608..071ffd7 100644
--- a/tests/testhelpers.py
+++ b/tests/testhelpers.py
@@ -380,7 +380,7 @@
@unittest.expectedFailure
def test_create_autospec_unbound_methods(self):
- # see issue 128
+ # see mock issue 128
class Foo(object):
def foo(self):
pass