Doctest is kind of a cool way of writing little unit tests for things while documenting them at the same time. I think this use case is worth supporting in some way.
Current approach - use a magic local variable to specify some test cases, each of which must evaluate to a truthy value.