[Matplotlib-devel] Reorganising the test files?

Chris Barker chris.barker at noaa.gov
Fri Jan 27 17:07:00 EST 2017


On Wed, Jan 25, 2017 at 2:38 PM, Nelle Varoquaux <nelle.varoquaux at gmail.com>
wrote:

> Actually, it is really a pain that Matplotlib doesn't follow python
> standards for any contributors that contributes to any other python
> packages.
>

very true, but...

1) If we were starting from scratcth that would be one thing, but a lot of
thrash jsut to meet a "standard" is probably not worth it.

2) I don't know how standardized this concept is, and personally, I don''t
like it (if I understand it correctly, anyway)

I prefer that ALL tests be in one single directory tree, ideally with that
tree mtaching the package / subpacakge/module tree of the project, ie:

project
    __init__.py
    proj_mod1.py
    sub_package1
      __init__.py
      sub_mod1.py
    ...

test_project
    test_proj_mod1.py
    test_sub_package1
        test_sub_mod1.py

i.e. one test file for each module file.

With this method, it would not be hard to find the tests that correspond to
a particular python module.

I'm ambivalent about whether the test files should be importable packages,
and I think there is a lot to be said for keeping the test code outside the
installable package tree altogether, but I definitely don't like them all
intermingled.

though I still don't advocate a lot of churn for this...

-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170127/964e95b1/attachment.html>


More information about the Matplotlib-devel mailing list