EPISODE · Nov 16, 2023 · 16 MIN
209: Testing argparse Applications
from Test & Code · host Brian Okken
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
Embed this episode
Ready to play
209: Testing argparse Applications
No transcript for this episode yet
Similar Episodes
No similar episodes found.