[SciPy-dev] Doctest execution context
Robert Kern
robert.kern@gmail....
Wed Jul 16 03:01:43 CDT 2008
On Wed, Jul 16, 2008 at 02:58, Alan McIntyre <alan.mcintyre@gmail.com> wrote:
> 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.
Per package is convenient enough, I think.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Scipy-dev
mailing list