<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Jan 28, 2017 8:06 AM, "Eric Firing" <<a href="mailto:efiring.ocean@gmail.com">efiring.ocean@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Does anyone know why:<br>
<br>
1) In our Travis suite, the USE_PYTEST run takes much longer than the others.<br>
<br>
2) On master (approximately), when I try to run a single function with py.test, it isn't found.  Example:<br>
<br>
py.test lib/matplotlib/tests/test_axes<wbr>.py::test_hist_steplog<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">-n</div></div>