<br><br><div class="gmail_quote">On Tue, Aug 10, 2010 at 8:21 AM, Olemis Lang <span dir="ltr">&lt;<a href="mailto:olemis@gmail.com">olemis@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Aug 9, 2010 at 10:37 PM, Fernando Perez &lt;<a href="http://fperez.net" target="_blank">fperez.net</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>&gt; wrote:<br>
&gt; On Fri, Jul 30, 2010 at 5:01 AM, Olemis Lang &lt;<a href="mailto:olemis@gmail.com">olemis@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Probably this is a matter of flavors . The fact is that I&#39;ve not seen<br>
&gt;&gt; yet (or probably skipped ...) a strong reason (besides my current<br>
&gt;&gt; laziness ;o) in favor of *always* including tests inside a package<br>
&gt;&gt; prepared to run in production systems .<br>
&gt;<br>
&gt; This bug in the production, official Debian/Ubuntu delivered version of ATLAS:<br>
&gt;<br>
&gt; <a href="https://bugs.launchpad.net/ubuntu/+source/atlas/+bug/363510" target="_blank">https://bugs.launchpad.net/ubuntu/+source/atlas/+bug/363510</a><br>
&gt;<br>
&gt; was detected because numpy ships its test suite along with it, and someone ran<br>
&gt;<br>
&gt; import numpy<br>
&gt; numpy.test()<br>
&gt;<br>
&gt; on a production system, and boom.<br>
<br>
</div>I&#39;m not saying that testing code in production systems is a crazy idea<br>
, I&#39;m just saying that , if that&#39;s needed , tests can be installed at<br>
any time and , once done with testing , then removed once again.<br>
<div class="im"><br>
&gt; Yes, it could have been found<br>
&gt; otherwise, but it was very, very useful for the numpy developers to<br>
&gt; know this, and also to be able to ask users of other similar systems<br>
&gt; to also run numpy.test() until we could understand where it was coming<br>
&gt; from.<br>
&gt;<br>
<br>
</div>+1<br>
<div class="im"><br>
&gt; Production systems are the ones where you want to know that things<br>
&gt; work correctly, right? So they should be the ones where you actually<br>
&gt; test your code.<br>
&gt;<br>
<br>
</div>Sorry , but I don&#39;t agree . I&#39;d rather say «they should be the ones<br>
where you actually test your code.*once something is going wrong &amp; the<br>
problem cannot be identified in a test environment* »<br>
<div class="im"><br>
&gt; We *always* ship the tests with all projects I am involved with, and<br>
&gt; work very hard to provide really easy ways for users to run the full<br>
&gt; test suite and provide us with useful feedback when something goes<br>
&gt; wrong.<br>
&gt;<br>
<br>
</div>you see ? «when something goes wrong.»<br>
;o)<br>
<div class="im"><br>
&gt; I can&#39;t count the number of bugs we&#39;ve found in this manner, simply<br>
&gt; because they only appear with some combination of compiler, hardware<br>
&gt; endianness, library versions, etc, which developers would *never* have<br>
&gt; access to, but some user at some big government lab happens to run on.<br>
&gt;<br>
<br>
</div>In theory , that should be tackled by setting up a slave or VM with<br>
similar characteristics in a CI environment . If you don&#39;t have the<br>
means to do so (which I understand perfectly ;o) &amp; the user is really<br>
interested in confirming that everything is OK with future versions ,<br>
then IMO the right thing to do should be making (him | her) part of<br>
the (testing | integration | release) process by setting up a testing<br>
environment as similar as possible to the production env so as to<br>
test&#39;em (e.g. more or less that&#39;s what we do with Trac XmlRpcPlugin<br>
<div class="im">;o) .<br>
<br></div></blockquote><div><br></div><div>No way. </div><div><br></div><div>You can&#39;t recommend to set up a VM to be &#39;as similar as possible to the production environment&#39;.</div><div><br></div><div>If you have a server A, model 1 with OS B version 1, then a VM *will not*  be able to replicate *fully* that environment.</div>
<div><br></div><div>Having an environment for testing that differs from production *is not OK*. </div><div><br></div><div>There is no way to &#39;have the means to&#39; replicate every single combination of Hardware and Operating Systems out there, hence</div>
<div>the need to include tests.</div><div><br></div><div>What you can do/have is a testing environment with VM&#39;s all over, which is fine. But that doesn&#39;t mean you will be able to </div><div>cover your bases.</div>
<div><br></div><div>I fully agree with Fernando, Jesse, Michael and all the others that recommended including tests with your package/module </div><div>and making it easy for end users to be able to run your tests.</div><div>
<br></div><div><br></div><div><br></div><div>-Alfredo</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
--<br>
Regards,<br>
<br>
Olemis.<br><br></div></blockquote></div>