django-test-extensions
django-test-extensions copied to clipboard
codecoverage causes re-registration of admin models
When I have a model that has an admin interface registered, and I run test with —coverage, then I get an AlreadyRegistered exception:
Traceback (most recent call last):
File "./manage.py", line 11, in
File "/usr/local/Cellar/EasyInstall/2.6/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/contrib/admin/sites.py", line 78, in register raise AlreadyRegistered('The model %s is already registered' % model.name) django.contrib.admin.sites.AlreadyRegistered: The model Country is already registered
My workaround was to ignore all exceptions when importing for coverage checking.