Discover this podcast and so much more

Podcasts are free to enjoy without a subscription. We also offer ebooks, audiobooks, and so much more for just $11.99/month.

111: Subtests in Python with unittest and pytest - Paul Ganssle

111: Subtests in Python with unittest and pytest - Paul Ganssle

FromTest and Code


111: Subtests in Python with unittest and pytest - Paul Ganssle

FromTest and Code

ratings:
Length:
49 minutes
Released:
May 2, 2020
Format:
Podcast episode

Description

In both unittest and pytest, when a test function hits a failing assert, the test stops and is marked as a failed test.
What if you want to keep going, and check more things?
There are a few ways. One of them is subtests.
Python's unittest introduced subtests in Python 3.4.
pytest introduced support for subtests with changes in pytest 4.4 and a plugin, called pytest-subtests.
Subtests are still not really used that much.
But really, what are they? When could you use them?
And more importantly, what should you watch out for if you decide to use them?
That's what Paul Ganssle and I will be talking about today. Special Guest: Paul Ganssle.
Released:
May 2, 2020
Format:
Podcast episode

Titles in the series (100)

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.