Test & Code :  Python Testing for Software Engineering

Test & Code is a weekly podcast hosted by Brian Okken. The show covers a wide array of topics including software engineering, development, testing, Python programming, and many related topics. When we get into the implementation specifics, that's usually Python, such as Python packaging, tox, pytest, and unittest. However, well over half of the topics are language agnostic, such as data science, DevOps, TDD, public speaking, mentoring, feature testing, NoSQL databases, end to end testing, automation, continuous integration, development methods, Selenium, the testing pyramid, and DevOps.



65: one assert per test

Is it ok to have more than one assert statement in a test?
I've seen articles that say no, you should never have more than one assert.
I've also seen some test code made almost unreadable due to trying to avoid more than one assert per test.

Where did this recommendation even come from? What are the reasons?
What are the downsides to both perspectives?

That's what we're going to talk about today.

Sponsored By:

  • PyCharm Professional: Try PyCharm Pro for an extended 4 month trial before deciding which version you need. If you value your time, you owe it to yourself to try PyCharm. Promo Code: TESTNCODE2019

Support Test & Code - Software Testing, Development, Python


  • Twitter survey about multiple asserts/checks — Are multiple asserts/checks ok in an automated test?
  • Multiple Asserts Are OK - Bill Wake
  • pytest-check: A pytest plugin that allows multiple failures per test.


 2019-02-17  19m