Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 505 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 505 Bytes

doctest-eval

Fork of Python 2.7's doctest adding support for dict literals and other evalable expressions

Behaves like regular doctest except when the expected expression can be evaled and the final statement in the REPL is an expression, in that case the result of that expression is compared with the evaled expression using ==.

This means that dicts, sets etc are suitable for use in a doctest, both the following pass:

>>> {1, 2}
{1, 2}

>>> {1, 2}
{2, 1}