Some time ago I asked on Twitter: I was curious what you use #Python decorators for? And I got quite an amazing / insightful response: The obvious next step for me was to look at some examples / use cases. So below are 5 useful applications of decorators. Study them, then apply similar things to… Continue reading 5 Helpful Python Decorator Use Cases
Articles on testing
10 Cool Pytest Tips You Might Not Know About
By Bob Belderbos on 26 February 2021
Here are 10 things we learned writing pytest code that might come in handy.
Freezegun – Real Joy for Fake Dates in Python
By AJ Kerrigan on 14 August 2020
Freezegun is a library for mocking Python datetimes. It does one thing, does it well, and lets you get on with your life.
Assertions About Exceptions With pytest.raises()
By AJ Kerrigan on 18 May 2020
It’s useful to test for exceptions exceptions in your code. A handy feature of pytest makes that fun and flexible!
Refactoring Opportunities That Will Boost the Quality of Your Code
By Bob Belderbos on 19 April 2020
Refactoring is all about making your code more maintainable. In this article I will provide you with Python and generic software tips to write better code.
How to Debug a Hanging Test Using pytest
By Bob Belderbos on 18 March 2020
Today a wanted to share a neat trick that might save you some headache: debugging a hanging test.
How to Cleanup S3 Objects and Unittest it
By Giuseppe Cunsolo on 2 September 2019
In this guest post Giuseppe shares what he learned having to cleanup a large number of objects in an S3 bucket. He introduces us to some boto3 as well as moto and freezegun he used to test his code. Enter Giuseppe …
PyBites Twitter Digest – Issue 33, 2018
By PyBites Team on 21 October 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
PyBites Twitter Digest – Issue 31, 2018
By PyBites Team on 7 October 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
PyBites Twitter Digest – Issue 30, 2018
By PyBites Team on 23 September 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.