Skip to content
New issue

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

Add support for assert_called() #115

Merged
merged 1 commit into from
Apr 11, 2018
Merged

Add support for assert_called() #115

merged 1 commit into from
Apr 11, 2018

Conversation

rouge8
Copy link
Contributor

@rouge8 rouge8 commented Apr 10, 2018

This was added in Python 3.6.

I also re-ordered the wrappers to match the order in the unittest.mock docs to make it easier to see if any are missing in the future.

I'm not actually using this, but I noticed it while trying to figure out why assert_called_once() wasn't working with mocker.spy() 😂

ref: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_called

@coveralls
Copy link

coveralls commented Apr 10, 2018

Coverage Status

Coverage remained the same at ?% when pulling 6886887 on rouge8:feature/assert-called into 3dc96f9 on pytest-dev:master.

This was added in Python 3.6.

I also re-ordered the wrappers to match the order in the unittest.mock
docs to make it easier to see if any are missing in the future.

ref: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_called
@nicoddemus
Copy link
Member

Thanks a lot @rouge8, really appreciate you taking the time to write those PRs! 👍

If you are not in a rush to use this, I will make a new release in a few weeks.

@nicoddemus nicoddemus merged commit 887fec3 into pytest-dev:master Apr 11, 2018
@rouge8
Copy link
Contributor Author

rouge8 commented Apr 11, 2018

I don’t actually need this at all, so no rush!

@nicoddemus
Copy link
Member

OK thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants