kaste / mockito-python

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

Let mockito check expectations on `__exit__` #55

Open kaste opened 2 years ago

kaste commented 2 years ago

There is an interesting patch on SublimeLinter https://github.com/SublimeLinter/SublimeLinter/commit/eea4e984da374c33255b551266b90d1e0d0b7650

It looks like we don't verify anything when popping the contextmanager stacks, ahem on __exit__, and it totally makes sense to check if a set expectation holds and if a stub has been used actually.

gonzalesMK commented 1 year ago

This feature would be great!

Could also add an option on unstub to check for unused mocks ?