This is a series of posts, following a talk I gave (twice - at Pycon-US 2023 and Pycon-IL 2024), about testing best (and not-so-best) practices.

The talk shares 10 practices that I had bad experience with, along with ways of avoiding them.

The main objective of the post series is to help you write tests that have a better ROI.
I’ll discuss different practices, different ways that we can work.
These practices affect us by changing the properties of our tests:

  • Strength - how well they catch bugs
  • Maintainability - how easy it is to work with them
  • Performance - how fast they run

Starting with simple (but useful!), and moving on to more complex ideas:

  1. There are no tests (warm up)
  2. Untested tests
  3. The tests are not isolated
  4. No locality of behavior
  5. Unclear language
  6. Testing too many things
  7. Improper test scope
  8. Test doubles everywhere
  9. Slow tests
  10. Wrong priorities

Videos and slide decks from the talks

10 Ways To Shoot Yourself In The Foot With Tests - PyCon-US 2023 (English)

Given at Salt Lake City, Utah.
Slides: Slideshare PyCon US 2023


10 Ways To Shoot Yourself In The Foot With Tests - PyCon-IL 2024 (Hebrew)

Slides: Slideshare PyCon IL 2024