[PATCH 2 of 2 RFC] tests: add support for inline doctests in test files

Matt Mackall mpm at selenic.com
Wed Oct 12 15:21:46 CDT 2011


On Wed, 2011-10-12 at 22:05 +0200, Idan Kamara wrote:
> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1318449674 -7200
> # Node ID 9a40d6434775313492fdda827f3eaaf9515d862c
> # Parent  c3793a3a0926288e6d46db8a2dc1e571aee141a5
> tests: add support for inline doctests in test files
> 
> This adds doctest like syntax to .t files, that can be interleaved with regular
> shell code:
> 
>   $ echo -n a > file
>   >>> print open('file').read()
>   a
>   >>> open('file', 'a').write('b')
>   $ cat file
>   ab

This is awesome, queued.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list