Mercurial > hg
view tests/test-hghave.t @ 22564:9599e86159ac
heredoctest: use the same dict for local/global contexts as in doctest
In order to mimic module-level evaluation, globals and locals should be the
same object, so doctest does not pass separate locals dict.
https://docs.python.org/2.7/reference/simple_stmts.html#exec
This fixes NameError in the following example:
>>> import foo
>>> def bar():
... foo # must exist in globalvars
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 28 Sep 2014 14:15:43 +0900 |
parents | 60738066e37a |
children | 4d2b9b304ad0 |
line wrap: on
line source
Testing that hghave does not crash when checking features $ "$TESTDIR/hghave" --test-features 2>/dev/null