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

Remove assert_called_once in tests #142

Merged
merged 5 commits into from
Oct 29, 2019
Merged

Remove assert_called_once in tests #142

merged 5 commits into from
Oct 29, 2019

Conversation

mzjp2
Copy link
Contributor

@mzjp2 mzjp2 commented Oct 24, 2019

cf PyCQA/pycodestyle#624 πŸ‘¨β€πŸ’»

Don't think this is worth adding myself to RELEASE.md, feel free to merge/close. 🎸

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

  • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

  • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

  • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Motivation and Context

Using assert_called_once isn't recommended, especially when supporting Python 3.5, since it doesn't exist, but because the object is mocked, no error is raised.

How has this been tested?

πŸ€–

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change and added my name to the list of supporting contributions in the RELEASE.md file
  • Added tests to cover my changes
  • Assigned myself to the PR

Didn't realise it was called with an argument πŸ€¦β€β™‚
@921kiyo 921kiyo changed the title Use assert_called_once_with in tests Remove assert_called_once in tests Oct 25, 2019
Copy link
Contributor

@921kiyo 921kiyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks πŸ‘

Copy link
Contributor

@lorenabalan lorenabalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@lorenabalan lorenabalan merged commit 0473e67 into kedro-org:develop Oct 29, 2019
tomvigrass pushed a commit to tomvigrass/kedro that referenced this pull request Nov 7, 2019
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