Supercharge Your Python TDD Workflow With pytest-watcher

If you follow the Test-driven Development practice in your Python projects, you need to run your test suite often. Having to run it manually can become tedious. You can configure handy shortcuts in your favorite IDE to make the process easier. But there is even better way using pytest-watcher. What is pytest-watcher? pytest-watcher is a continuous test runner for Python projects that reruns your tests whenever you change a *.py file inside your project. ...

June 8, 2023

Optimizing your Django tests

If you are working on a large Django project, you probably have lots of automated tests running as part of your CI/CD process. As long as tests run fast, everyone is happy. But as your application grows in complexity, your tests start to take more and more time to run and eventually become a real bottleneck. In this post, I will share some ideas that can help you optimize runtime of your test suite. I assume you are using pytest, but recommendations described in this post should be easily applicable to other runners as well. ...

September 16, 2021