Podchaser Logo
Home
209: Testing argparse Applications

209: Testing argparse Applications

Released Thursday, 16th November 2023
Good episode? Give it some love!
209: Testing argparse Applications

209: Testing argparse Applications

209: Testing argparse Applications

209: Testing argparse Applications

Thursday, 16th November 2023
Good episode? Give it some love!
Rate Episode

How do you test the argument parsing bit of an application that uses argparse?

This episode covers:

  • Design for Test: Structuring your app or script so it's easier to test.
  • pytest & capsys for testing stdout
  • Adding debug and preview flags for debugging and testing
  • And reverting to subprocess.run if you can't modify the code under test

Also, there's a full writeup and code samples available:


The Complete pytest Course

Show More
Rate

Join Podchaser to...

  • Rate podcasts and episodes
  • Follow podcasts and creators
  • Create podcast and episode lists
  • & much more

Episode Tags

Do you host or manage this podcast?
Claim and edit this page to your liking.
,

Unlock more with Podchaser Pro

  • Audience Insights
  • Contact Information
  • Demographics
  • Charts
  • Sponsor History
  • and More!
Pro Features