- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | remi.lapeyre |
|---|---|
| Recipients | Adnan Umer, remi.lapeyre |
| Date | 2019-01-02.00:41:13 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1546389674.0.0.241829722582.issue35577@roundup.psfhosted.org> |
| In-reply-to |
| Content |
|---|
Is there a problem with:
from unittest import mock
class SomeClass:
def do_something(self, x):
pass
def some_function(x):
obj = SomeClass()
y = obj.do_something(x)
return y
def do_something_side_effect(self, x):
print(self)
return x
def test_some_function():
with mock.patch.object(SomeClass, "do_something", do_something_side_effect):
assert some_function(1)
? |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-01-02 00:41:15 | remi.lapeyre | set | recipients: + remi.lapeyre, Adnan Umer |
| 2019-01-02 00:41:14 | remi.lapeyre | set | messageid: <1546389674.0.0.241829722582.issue35577@roundup.psfhosted.org> |
| 2019-01-02 00:41:13 | remi.lapeyre | link | issue35577 messages |
| 2019-01-02 00:41:13 | remi.lapeyre | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
