The Real Python Podcast cover image

Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators

The Real Python Podcast

00:00

How to Use Doc Test to Test Your Code

You can create the doc tests as standalone files if you want also, which might be handy depending on how you're deploying the code. But one of the limitations that doc test has is it doesn't have the ability to use something like fixtures or set up and tear down mechanisms. It really is very specific about sort of exact matching for many, many things that you would be checking for. And a funny thing that he mentioned, we had that article that was covering ellipsis recently. There's actually a way to use an ellipsis and using this technique inside of doc test. That kind of like a wild card allowing other options there.

Play episode from 07:09
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app