[pytest-dev] no self-awareness for pytest

holger krekel holger at merlinux.eu
Fri Jan 8 03:49:00 EST 2016


On Fri, Jan 08, 2016 at 08:46 +0000, Floris Bruynooghe wrote:
> Hi
> 
> On 8 January 2016 at 06:55, Jason King <pizza at netspace.net.au> wrote:
> [...]
> > So it seems to be locating a function called 'test' in numpy's nosetester.py
> > file, thats in the virtualenv, and trying to set
> > it up as a test.  Which isn't what I want.  (I only want tests located in
> > matplotlib's install directory)
> 
> Can you not pass this directory you want to the py.test commandline
> then?  E.g. py.test [opts] lib/matplotlib/tests.  That way py.test
> will only try to collect tests from your test directory instead of
> everything in you current working directory.

Also, "py.test -h" reveals there is a "testpaths" setting for the ini
file where you can positively set the paths/directories where you want
to see collection happening if no positional arguments are passed to
pytest.

holger



More information about the pytest-dev mailing list