[Matplotlib-devel] Reorganising the test files?
Nelle Varoquaux
nelle.varoquaux at gmail.com
Wed Jan 25 14:38:55 EST 2017
> I am against moving the test files into the sub-modules.
>
> It seems like a lot of thrashing (on the down-stream packagers who package
> the main library and tests separately and on peoples brains) for no obvious
> gain.
>
Actually, it is really a pain that Matplotlib doesn't follow python
standards for any contributors that contributes to any other python
packages. I would suspect that it is also annoying for downstream packages
that Matplotlib does not follow standards.
The reason I brought this up in the first place is because it took me a
couple of minutes to look for a test for cbook.mkdirs function while
reviewing a PR, and had to resort to doing a git grep to convince me it
wasn't tested. If we had followed the standards in the first place, it
would probably have taken me 5seconds.
I have the same feeling for Matplotlib's unstandard packaging layout.
N
>
> Tom
>
> On Wed, Jan 25, 2017 at 1:15 PM Nelle Varoquaux <nelle.varoquaux at gmail.com>
> wrote:
>
> Hello everyone,
>
> Now that the pytest migration is almost over (thanks Elliott!), I was
> wondering if this could be a good opportunity to reorganize the test files
> to follow a "normal" python package structure.
> The recommended python package structure is to place a tests folder in
> each submodule, and the relevant tests files in this folder.
>
> To take a concrete example, it would for example require moving the tests
> corresponding of matplotlib.sphinx_ext.mathmpl.py to
> matplotlib/sphinxext/tests/test_mathmpl.py
>
> This would be a more or less incompatible change in the sense that
> matplotlib.tests seems to be an importable module (it probably shouldn't),
> with about a dozen functions. We could easily make this backward compatible
> in case anyone does use this module anywhere.
>
> ['__builtins__',
> '__cached__',
> '__doc__',
> '__file__',
> '__loader__',
> '__name__',
> '__package__',
> '__path__',
> '__spec__',
> '_multiprocess_can_split_',
> 'absolute_import',
> 'assert_str_equal',
> 'difflib',
> 'division',
> 'os',
> 'print_function',
> 'setup',
> 'six',
> 'unicode_literals']
>
> If we go down that route, we need to completely finish the pytest
> migration first.
>
> Cheers,
> N
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170125/4b027646/attachment-0001.html>
More information about the Matplotlib-devel
mailing list