kaste / mockito-python

Mockito is a spying framework
MIT License
123 stars 12 forks source link

Add API to clear all mock invocations #17

Closed maximkulkin closed 6 years ago

maximkulkin commented 6 years ago

Adds clear() method to clear all recorded invocations on mock(s). Useful to be able to check invocations in particular section of the code without effects of setup before.

Closes #16

kaste commented 6 years ago

Hi @maximkulkin really sorry for taking so long.

I basically take this PR. I will change the short name clear to probably forget_invocations bc all the public API has super long and explicit names. But specifically the name 'clear' is not so good for python.

kaste commented 6 years ago

Pulled it manually https://github.com/kaste/mockito-python/commit/36e467f46baa02b67674693ddfc2659f14c63aef and GitHub didn't noticed 😄.