<div class="gmail_quote">On Wed, Jul 27, 2011 at 2:44 PM, Matthew Brett <span dir="ltr"><<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<div><div></div><div class="h5"><br>
On Wed, Jul 27, 2011 at 12:25 PM, Mark Wiebe <<a href="mailto:mwwiebe@gmail.com">mwwiebe@gmail.com</a>> wrote:<br>
> On Wed, Jul 27, 2011 at 1:01 PM, Matthew Brett <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> On Wed, Jul 27, 2011 at 6:54 PM, Mark Wiebe <<a href="mailto:mwwiebe@gmail.com">mwwiebe@gmail.com</a>> wrote:<br>
>> > This was the most consistent way to deal with the parameterized dtype in<br>
>> > the<br>
>> > repr, making it more future-proof at the same time. It was producing<br>
>> > reprs<br>
>> > like "array(['2011-01-01'], dtype=datetime64[D])", which is clearly<br>
>> > wrong,<br>
>> > and putting quotes around it makes it work in general for all possible<br>
>> > dtypes, present and future.<br>
>><br>
>> I don't know about you, but I find maintaining doctests across<br>
>> versions changes rather tricky.  For our projects, doctests are<br>
>> important as part of the automated tests.  At the moment this means<br>
>> that many doctests will break between 1.5.1 and 2.0.  What do you<br>
>> think the best way round this problem?<br>
><br>
> I'm not sure what the best approach is. I think the primary use of doctests<br>
> should be to validate that the documentation matches the implementation, and<br>
> anything confirming aspects of a software system should be regular tests.<br>
>  In NumPy, there are platform-dependent differences in 32 vs 64 bit and big<br>
> vs little endian, so the part of the system that changed already couldn't be<br>
> relied on consistently. I prefer systems where the code output in the<br>
> documentation is generated as part of the documentation build process<br>
> instead of being included in the documentation source files.<br>
<br>
</div></div>Would it be fair to summarize your reply as 'just deal with it'?<br></blockquote><div><br></div><div>I'm not sure what else I can do to help you, since I think this aspect of the system should be subject to arbitrary improvement. My recommendation is in general not to use doctests as if they were regular tests. I'd rather not back out the improvements to repr, if that's what you're suggesting should happen. Do you have any other ideas?</div>
<div><br></div><div>-Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
See you,<br>
<br>
Matthew<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br>