On Thu, Sep 05, 2013 at 02:58 -0700, Yang Zhang wrote: > Right, and we do use that already, but short of programmatically > generating a list of all the packages except those that I want to > exclude (given a fairly sprawling codebase), I was just wondering if > there was a cleaner approach—if not, consider this a feature request!
FWIW the filename is also somewhat matchable, so "py.test -k 'not somepackage'" should exclude all tests residing in a directory "somepackage". holger > On Thu, Sep 5, 2013 at 2:55 AM, holger krekel <[email protected]> wrote: > > On Wed, Sep 04, 2013 at 17:03 -0700, Yang Zhang wrote: > >> You can use -k to filter out tests following a certain name > >> pattern/predicate, but can you filter out tests under a certain > >> package or directory? Didn't spot any relevant flags in the > >> documentation but perhaps I'm missing something. Thanks. > > > > py.test accepts files and directories:: > > > > py.test -k "..." path/to/dir > > > > will only consider tests from that dir. > > > > holger > > > > -- > Yang Zhang > http://yz.mit.edu/ > _______________________________________________ Pytest-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytest-dev
