[Matplotlib-devel] our tests

Antony Lee antony.lee at berkeley.edu
Sat Jan 28 15:26:43 EST 2017


FWIW there is an open issue (generally approved by the pytest devs) to
simplify selection of a single test:
https://github.com/pytest-dev/pytest/issues/2193

2017-01-28 11:49 GMT-08:00 Nathaniel Smith <njs at pobox.com>:

> On Jan 28, 2017 8:06 AM, "Eric Firing" <efiring.ocean at gmail.com> wrote:
>
> Does anyone know why:
>
> 1) In our Travis suite, the USE_PYTEST run takes much longer than the
> others.
>
> 2) On master (approximately), when I try to run a single function with
> py.test, it isn't found.  Example:
>
> py.test lib/matplotlib/tests/test_axes.py::test_hist_steplog
>
>
> I've never figured out the syntax for naming a single test -- I think it
> might vary depending on things like whether your test directories are
> packages? Pytest pulls configuration from the files and directories around
> each test, so it kind of needs to "see" the whole test tree.
>
> But, I did (after an embarrassingly long time) discover the fabulous -k
> switch. The idea is you run pytest normally so it can see your whole test
> suite, but then "-k hist_steplog" tells it to ignore any tests whose name
> doesn't have that as a substring.
>
> -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/20170128/0e924e22/attachment.html>


More information about the Matplotlib-devel mailing list