Search code examples
djangojenkinsdjango-jenkins

using unittest.skip with django-jenkins


I have added @unittest.skip decorator for few of my test methods. It works as expected while running with python manage.py test --settings=PATH_TO_SETTING

But it does not work with python manage.py jenkins --settings=PATH_TO_SETTING

I read that I need to add JENKINS_TEST_RUNNER to settings file but I am not aware of how to add that class.

How can I make it work with jenkins ?


Solution

  • Adding the JENKINS_TEST_RUNNER is not solving the problem. it can be added as

     JENKINS_TEST_RUNNER = 'django_jenkins.runner.CITestSuiteRunner'
    

    I solved the problem by setting the name attribute explicitly on the classes in whose test functions i am using unittest.skip