On Aug 12, 6:12 pm, "Edward K. Ream" <[email protected]> wrote:
> So the only task left is to add the following list to the locals of
> the *caller*:
>
> [locals.get(z) for z in added]
Alas, according to the Python docs, it is invalid to alter the dict
return by locals().
In theory, we could alter the context of the exec in
generalTestCase.runTest. This is the code that executes the body
text of @test nodes, so we would have to hack the *headline* to
indicate the added code. This is too ugly to contemplate seriously.
In short, this looks like the exec in the unit test is the best that
can be done::
exec(g.findTestScript(c,'@common leoRst test code'))
I can live with this.
Anyone have any ideas how an exec can modify the context of the
caller?
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.