herr kaste

Results 355 comments of herr kaste

That sounds like the other way around from your original posting because you want to call through to the original code. (In the OP you defined a function `fake_method` on...

An implementation of `thenCallOriginalImplementation` is welcome. Of course, the example, if you test a `retry`-er you really want mocked/stubbed answers. A retry-er is generic. For the code you gave, as...

Yes, I wanted to do that at some point. I don't know a good name. For `thenCallRealMethod`, I don't like the *method* in it as we're not restricted to methods...

Afaik this is not possible. Historically mockito is completely focused on stubbing/patching callables. I want this too and actually have it on my to-do list but you can try a...

Two cents here: - Since mocking and esp. monkey patching in python in general is very easy, if I look at your example code, it seems that testing and testability...

> I read about monkeypatch but it doesn't seem much different from mocker.patch. Or am I missing something? `monkeypatch` is far less complex. It's just a couple of lines, similar...

`mockito` for python is basically community driven. But 'timeout' seems really like an edge user case when you're already using mocks, and I don't think you can brute-force-just-add-it to the...

Well, this really depends on how the code actually realizes its asynchronicity. Now, if `some_async_fn` would be `async` you could `await` its result. (In older pythons you converted the thread...

Updated the main comment to reflect the new behavior.

Updated again, very slick, not completely trivial.