[Solved]-Ignore a specific test using Django

19👍

The test command has no built-in ignore option.

But you could use the @skip or @skipIf decorator in the class you want to exlude: http://docs.python.org/2.7/library/unittest.html#unittest.skipIf

 import unittest

 @unittest.skip("skip the test")
 class MyTestClass(TestCase):
 ...
👤shry

4👍

Test command does not have ignore option by default. You can try django-ignoretests. You can install it using

pip install django-ignoretests

You can ignore apps by including them in IGNORE_TESTS as given below:

IGNORE_TESTS = (
    # Apps to ignore. example : 'django.contrib.auth',
)
👤arulmr

Leave a comment