<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Jan 29, 2017 1:44 AM, "Antony Lee" <<a href="mailto:antony.lee@berkeley.edu">antony.lee@berkeley.edu</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>It looks like there are two issues at hand here.</div><div><br></div><div>- Should there be one test module per real module?  My opinion is that the answer is generally yes, but there are cases where this would be awkward, so we shouldn't make it a hard rule.  For example, `test_pickle.py` tests the picklability of various objects, from simple ones to entire figures.  Of course, each of the tests could be moved to the test module corresponding to the module where the object is defined, but I doubt this would make things clearer.</div><div><br></div><div>- Should there be a `matplotlib.tests` package containing all the tests (possibly replicating the matplotlib hierarchy) or one `.tests` subpackage per package?  Let's realize that matplotlib has a very flat hierarchy compared to the other projects Nelle mentioned.  Basically, the change would entail moving</div><div>    - test_axes to axes/tests</div><div>    - test_backend_* to backends/tests</div><div>    - test_cbook to cbook/tests</div><div>    - test_triangulation to tri/tests</div><div>    - test_style to style/tests</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Another thing to consider here is that some pytest features are biased towards layouts where all tests live in a single hierarchy. If you define a custom fixture in a conftest.py file, that fixture is available to tests in the directory and subdirectories, but not siblings. Maybe matplotlib doesn't use these features though, or maybe there's some way around this in pytest (if you figure it out I'd love to know! pytest is very, uh, "feature rich", and I haven't looked into this in depth, it's just something I ran into).</div><div dir="auto"><br></div><div dir="auto">-n</div></div>