Test & Code

87: Paths to Parametrization - from one test to many


Listen Later

There's a cool feature of pytest called parametrization.

It's totally one of the superpowers of pytest.

It's actually a handful of features, and there are a few ways to approach it.

Parametrization is the ability to take one test, and send lots of different input datasets into the code under test, and maybe even have different output checks, all within the same test that you developed in the simple test case.

Super powerful, but something since there's a few approaches to it, a tad tricky to get the hang of.

Links:

  • git branch — -a : list all branches, -r : just remotes
  • pytest changelog
  • pytest deprecations and removals
  • Python Testing with pytest — Test function parametrization is in chapter 2. Fixture parametrization is in chapter 3.
  • Parametrizing test functions — pytest documentation
  • pytest fixtures — pytest documentation
...more
View all episodesView all episodes
Download on the App Store

Test & CodeBy Brian Okken

  • 4.7
  • 4.7
  • 4.7
  • 4.7
  • 4.7

4.7

70 ratings


More shows like Test & Code

View all
Radiolab by WNYC Studios

Radiolab

44,013 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

625 Listeners

Heavy Networking by Packet Pushers

Heavy Networking

328 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

588 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,001 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

141 Listeners

Unexplainable by Vox

Unexplainable

2,278 Listeners

Network Automation Nerds by Packet Pushers

Network Automation Nerds

3 Listeners