Artwork

Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

209: Testing argparse Applications

16:17
 
Share
 

Manage episode 384137015 series 2508404
Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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

  continue reading

221 episodes

Artwork

209: Testing argparse Applications

Python Test

139 subscribers

published

iconShare
 
Manage episode 384137015 series 2508404
Content provided by Brian Okken. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Brian Okken or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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

  continue reading

221 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide