The larger part of our coding time is spent reading and debugging code already written. For this Python’s pdb is an unmissable module in your Python toolbox. In this article I show you the most common options and some practical examples.
Articles on Testing
Hiding BCC Recipients in Python MIME Emails
By Julian Sequeira on 6 September 2017
How to actually hide the BCC recipients when sending an email with Python MIME.
Parsing Twitter Geo Data and Mocking API Calls by Example
By Bob Belderbos on 17 June 2017
“Is this Bob or Julian?!” … yeah tweeting from our shared @pybites Twitter account can be confusing! So I made a little script to parse the location of our tweets. Then I extended it to make it testable. I wrote a decorator to cache a couple of API outputs to be used with the unittest.mock patch decorator I learned about. A simple script turned into a good learning exercise.