Comments (2)
That should be straightforward to add.
I can also add child return value calls as well - which gets you halfway to
issue 9.
Suggested output:
>>> m = Mock()
>>> m().something().other()
>>> m.method_calls
[('__call__', (), {}), ('().something', (), {}), ('().something().other', (),
{})]
The question is whether this would pollute method calls too much for people who
prefer to track them separately? (Adding '__call__' is straightforward - it is
the
extension of this that I wonder about.)
Original comment by fuzzyman
on 9 Dec 2008 at 12:26
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from mock.
This feature request is now being tracked in issue 82.
Original comment by fuzzyman
on 28 Mar 2011 at 12:18
- Changed state: Duplicate
from mock.
Related Issues (20)
- Crash on comparing call_args with long strings
- Bug on call() comparison HOT 7
- Cannot autospec mock builtins.print in python3.4
- deepcopying property of mock with spec breaks mocked calls
- Assigning mock property as another mock fails? HOT 3
- Invalid calls info when mock object called with updated dict as arg HOT 2
- Call stack on function calls making changes to dictionary fails at assertions of arguments because the dictionary changes. HOT 4
- Make call assertion errors align visually HOT 1
- Remove redundant code
- mock patch autospec doesn't work on staticmethods
- side_effect Does Not Work With autospec HOT 3
- Unexpected behaviour of assert_has_calls with empty list as argument
- copy.copy(sentinel.foo) is not sentinel.foo
- assert_called_with scope issues
- Include wheels on the PyPI distribution
- MagicMock.__truediv__ doesn't work on python3
- assert_has_calls does NOT consider order HOT 1
- create_autospec causes error in python3.4 HOT 2
- Cannot patch unittest.main.os because of how unittest imports main HOT 1
- "wraps" should work with "side_effect"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock.