[Grok-dev] Martian and Fake Modules
Martijn Faassen
faassen at startifact.com
Thu Dec 17 07:21:59 EST 2009
Hey Paul,
Paul Wilson wrote:
> I've just released an early version of manuelpi.fakemodule to PyPI
> [1]. To recap, this allows you to define module's within doctests that
> are automatically available for subsequent tests. This is tested and
> works on Martian's README.txt only, on a branch that I've been hacking
> on recently. [2]
Cool!
One question would be: this functionality looks to be so generally
useful would it make sense to fold it into Manuel proper? Have you
discussed it with Benji?
> I'm very interested in comments and feedback regarding this approach
> and my implementation. Points to note:
> * "module-block:: <module-name>" - is this notation okay?
Looks reasonable.
> * Every time a module block is encountered, I push all doctest's
> defined object references into __builtin__. Why? Such that fake
> modules can find things you've defined or imported in previous doctest
> statements.
That sounds reasonable too. Looks pretty enough.
Thanks!
Regards,
Martijn
More information about the Grok-dev
mailing list