beanbaginc / kgb

Python function spy support for unit tests
MIT License
48 stars 5 forks source link

Fixed unspy_all. Setting spies to empty set, not list. #6

Closed nikolalosic closed 4 years ago

nikolalosic commented 4 years ago

unspy_all was not working correctly as it set spies to empty list but should be empty set. SpyAgency wasn't usable after calling unspy_all since it uses set methods like add.

chipx86 commented 4 years ago

Thanks for the patch! I also noticed this, and had it pending in my tree as part of some other work. It's a slightly difference approach (calling self.spies.clear()), but I'll pull it out and give you credit as the author.

For future review requests, we perform all code reviews on our Review Board server, rather than using pull requests.

I always like to hear from kgb users. What are you using it for? We're always happy to link to projects in our README.

chipx86 commented 4 years ago

Made some tweaks and landed this. Thanks!

nikolalosic commented 4 years ago

HI @chipx86, I'll use Review Board next time! It's a private company project so can't tell you a lot about it. But anyway, kgb is awesome and it really helped me build integration tests. I also plan to use it in future projects.

Thanks for the credit even if you have already fixed this!

chipx86 commented 4 years ago

Totally understandable, but I'm glad to hear you're enjoying it! It's still a pretty under-the-radar library. We need to get the word out.

I'll have KGB 6 out probably in the next week, maybe two. Highlights are going to be:

If you have thoughts on things KGB might be missing for your workflows, let me know!