cyber101
cyber101

Reputation: 899

How can I ignore all tests in a specific folder using nose?

I have many unit tests organized in the following manner:

test_dir/
  test_important1.py
  test_important2.py
  test_important3.py
  ....
  basic tests/testA1.py
              testA2.py
              ....
              __init__.py

I want to run all test in the test_dir directory itself, not including tests found at basic tests.

How can this be achieved?

Thanks!

Upvotes: 2

Views: 1833

Answers (1)

alecxe
alecxe

Reputation: 473893

There is an --exclude-dir option introduced by nose-exclude:

nosetests --exclude-dir="basic tests/"

Upvotes: 2

Related Questions