<p dir="auto">The common testing framework still needs some work that I think is quite important to ensure consistency and stability.<br>
This issue is my wishlist, if any one wants to give it a shot (and so that I don't forget).</p>
<ul dir="auto">
<li>test how classifiers handle only one class being present</li>
<li>check clustering and transformer objects</li>
<li>check how non-numeric-contiguous labels are handled in classifiers</li>
<li>test for consistent output shapes in regressors / classifiers / transformers</li>
<li>test how methods handle non-float input (does uint8 give overflow errors?)</li>
</ul>
<p dir="auto"><strong>Easy:</strong></p>
<ul dir="auto">
<li>in test_common, check that the ValueError raise has a useful error message. (see sparse test for an example)</li>
<li>put as many of the "specific" tests in test_clustering, test_transformers, ... into test_non_meta_estimators.</li>
</ul>
<p dir="auto"><strong>Not so easy:</strong></p>
<ul dir="auto">
<li>calling <code class="notranslate">fit</code> forgets the previous model if any</li>
<li><del>check how classifiers handle only one class being present</del></li>
<li><del>test how models handle non-float input (does uint8 cause overflows?)</del></li>
</ul>
<p dir="auto"><strong>Things done</strong></p>
<p dir="auto">We should factorize common tests in a new file <code class="notranslate">test_common.py</code> (or maybe <code class="notranslate">test_input.py</code>?). Things to check:</p>
<ul dir="auto">
<li><del>can pickle the object</del></li>
<li><del>raise an exception when data contains nans</del></li>
<li><del>raise an exception for invalid input (e.g., <code class="notranslate">np.matrix</code> or <code class="notranslate">sp.csr_matrix</code> if dense only implementation)</del></li>
<li><del>raise an exception if <code class="notranslate">n_features</code> is not the same in <code class="notranslate">fit</code> and <code class="notranslate">predict</code> or <code class="notranslate">transform</code></del></li>
<li><del><code class="notranslate">__repr__</code> and <code class="notranslate">clone</code> work</del></li>
<li><del>check that we can pickle and unpickle estimators.</del></li>
<li><del>check that all classifiers have a <code class="notranslate">classes_</code> attribute (needs some fixes)</del></li>
</ul>
<hr>
<p dir="auto">Edit by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/amueller/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/amueller">@amueller</a>!</p>
<p dir="auto">Edit by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/GaelVaroquaux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/GaelVaroquaux">@GaelVaroquaux</a> on Aug 13th 2014 to reflect progress in the codebase.</p>