Talk Python To Me cover image

#24: Fluent Python

Talk Python To Me

DocTest: How to Check Code and Console Listings

2min Snip

00:00
Play full episode
The idea of DocTest is to make sure that whatever codes, snippets appear in documentation, particularly listings of console sessions, demonstrate stuff. So this was the starting point for DocTest. And then it's really good to do TDD, because you write a couple of stanzas of DocTest and then you implement the code that makes it pass. Yeah. You don't have to store all the keys, copies of the keys for every instance, right? Like you would with regular classes or objects.Yeah. Exactly. Or if you're in a debugger like PyCharm, you could probably hover over it and actually see it pop up in the watchman. yeah. Of course

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode