Extending doctest

N

Neil Cerutti

One of my current tests looks like this (the program is an
interpreter for a scheme-like language):
... ' (seqn (setbox b 1)'
... ' (setbox b 2)'
... ' (setbox b 3)'
... ' b))').interp(EmptyEnv(), EmptyStore())
>>> result #doctest: +ELLIPSIS
>>> result[0].location == result[1].location
True

The memrory location that the box refers to must match the actual
location in storage. Currently, the doctest stinks because it
depends on internal details of my implementation.

Is there a doctest feature that will allow me to stipulate that
one thing in a result is arbitrary, but identical to another
thing in that result?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top