[SciPy-dev] Doctest execution context
Alan McIntyre
alan.mcintyre@gmail....
Wed Jul 16 02:58:17 CDT 2008
On Wed, Jul 16, 2008 at 3:38 AM, Robert Kern <robert.kern@gmail.com> wrote:
> Tricky. "import scipy" doesn't import the subpackages, so that's
> pretty useless. Can you customize it per docstring? I.e. for the
> docstring of scipy.linalg.qr(), have a "from scipy.linalg import qr"
> or "from scipy import linalg" in the context?
We should be able to do that. Having an implicit "from scipy import
linalg" for every doctest in scipy/linalg would be the least
complicated thing, but if some other scheme makes more sense in terms
of keeping the examples simple/reasonable, I don't mind. We can go
down to the point of customizing it for each test if need be.
More information about the Scipy-dev
mailing list