Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.
…
continue reading
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!
Go offline with the Player FM app!
209: Testing argparse Applications
MP3•Episode home
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:
- Blog post: Testing argparse Applications
- Code Repo
The Complete pytest Course
- Level up your testing skills and save time during coding and maintenance.
- Check out courses.pythontest.com
221 episodes
MP3•Episode home
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:
- Blog post: Testing argparse Applications
- Code Repo
The Complete pytest Course
- Level up your testing skills and save time during coding and maintenance.
- Check out courses.pythontest.com
221 episodes
All episodes
×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.