Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore files or directories in nose2?

Tags:

python

nose2

I have a nose.cfg file which i'm porting to nose2. I can't see any way in the nose2 docs to ignore a file or directory.

In nose 1 this was done via these two flags:

ignore-files=settings_test*
exclude-dir=ignorethisdir

How can this be done in nose2?

like image 927
craigds Avatar asked Nov 24 '13 20:11

craigds


1 Answers

The exclude-dir is available when you install nose-exclude. This plugin is currently only available for nose1: https://bitbucket.org/kgrandis/nose-exclude/overview

What is available is defining:

__test__ = False

in each TestCase or TestSuite inherited class.

They must be inherited from these classes for this to work. This is made available by the dundertest plugin which comes with nose2 and is enabled by default.

like image 200
Bernardo Torres Avatar answered Sep 29 '22 18:09

Bernardo Torres