December 2008
3 posts
Numbers that fool the Fermat test are called Carmichael numbers, and little is...
– footnote pg. 53 SICP
Mocking with Python
After recent conversations about the surgery I did to the DISQUS IMAP processing code in order to make it testable, I was steered toward Python mock modules. Of which there are a lot.
So I installed the python-mock module and coded up a quick example use case.
Often when writing unit tests, you stumble upon dependencies that the code you’re testing uses, but are orthogonal to the actual...