[issue30548] typo in documentation for create_autospec

2019-10-30 Thread Erik Byström
Erik Byström added the comment: Yes, you're right. I do think the docs are a bit misleading. Maybe something like this would make it more clear? "If a class is used as a spec then the returned object will be a mock of that class. When the constructor of the returned mock class is in

[issue30548] typo in documentation for create_autospec

2017-06-02 Thread Erik Byström
New submission from Erik Byström: "a class" should most probably be replaced by "an instance" in the documentation for create_autospec. "You can use a class as the spec for an instance object by passing instance=True. The returned mock will only be callable