Treceți offline cu aplicația Player FM !
209: Testing argparse Applications
Serii arhivate ("Sursă inactivă" status)
When? This feed was archived on October 20, 2025 17:10 (). Last successful fetch was on September 05, 2025 01:55 ()
Why? Sursă inactivă status. Servele noastre nu au putut să preia o sursă valida de podcast pentru o perioadă îndelungată.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 384137042 series 1952312
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
239 episoade
Serii arhivate ("Sursă inactivă" status)
When? This feed was archived on October 20, 2025 17:10 (). Last successful fetch was on September 05, 2025 01:55 ()
Why? Sursă inactivă status. Servele noastre nu au putut să preia o sursă valida de podcast pentru o perioadă îndelungată.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 384137042 series 1952312
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
239 episoade
Toate episoadele
×Bun venit la Player FM!
Player FM scanează web-ul pentru podcast-uri de înaltă calitate pentru a vă putea bucura acum. Este cea mai bună aplicație pentru podcast și funcționează pe Android, iPhone și pe web. Înscrieți-vă pentru a sincroniza abonamentele pe toate dispozitivele.