We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently nothing forbids to do when(...).then_return, but it is expected only when.called_with.then_return
An exception should be raised in inproper order of the methods
The text was updated successfully, but these errors were encountered:
I was thinking about that when I was testing how to do no args.
What do you think that instead of raising exception, using when would return object that simply does not have .then_return function?
I know it would take some code refactoring, but it might be easier for users to understand, which methods should be used in each step.
Something like:
class Z: .... class Y: def then_return(signature) -> Z: .... class X: def called_with(signature) -> Y: ... def when(signature) -> X: .....
So when you call when(...) IDE would simply not whisper you to use then_return, because X does not have it there.
Sorry, something went wrong.
No branches or pull requests
Currently nothing forbids to do when(...).then_return, but
it is expected only when.called_with.then_return
An exception should be raised in inproper order of the methods
The text was updated successfully, but these errors were encountered: