jeudi 2 juillet 2015

Unable to run Django's unit test

When I typed python manage.py test to run unit testcases, it prompted error messages as below:

Traceback (most recent call last):

...

  from django.test.utils import ContextList
  File "D:\dev\py27\lib\site-packages\django\test\utils.py", line 8, in <module>

  from unittest import skipIf, skipUnless
  ImportError: cannot import name skipIf

When I run unittest alone, it works fine, but running unittest in Django failed. unittest should be a built-in library of Python. Please let me know how to fix this issue.

Thanks.

Aucun commentaire:

Enregistrer un commentaire