[Numpy-discussion] Code samples in docstrings mistaken as doctests
Michael Abshoff
michael.abshoff at googlemail.com
Mon Jun 23 19:58:19 EDT 2008
Stéfan van der Walt wrote:
> 2008/6/24 Stéfan van der Walt <stefan at sun.ac.za>:
>> It should be fairly easy to execute the example code, just to make
>> sure it runs. We can always work out a scheme to test its validity
>> later.
Hi,
> Mike Hansen just explained to me that the Sage doctest system sets the
> random seed before executing each test. If we address
>
> a) Random variables
we have some small extensions to the doctesting framework that allow us
to mark doctests as "#random" so that the result it not checked. Carl
Witty wrote some code that makes the random number generator in a lot of
the Sage components behave consistently on all supported platforms.
> b) Plotting representations and
> c) Endianness
Yeah, the Sage test suite seems to catch at least one of those in every
release cycle.
Another thing we just implemented is a "jar of pickles" that lets us
verify that there is no cross platform issues (32 vs. 64 bits and big
vs. little endian) as well as no problems with loading pickles from
previous releases.
> we're probably halfway there.
>
> Regards
> Stéfan
Cheers,
Michael
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
More information about the NumPy-Discussion
mailing list