[Matplotlib-devel] Reorganising the test files?

Nelle Varoquaux nelle.varoquaux at gmail.com
Wed Jan 25 13:15:24 EST 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170125/09045d4b/attachment.html>


More information about the Matplotlib-devel mailing list