Closed ukch closed 12 years ago
Apologies. I wrote this issue before looking at the code. The problem arises when unittest2 is installed - django does a from unittest2 import *
, which doesn't import 'private' objects such as _TextTestResult
. However, it would appear that TextTestResult
and _TextTestResult
are the same object, so this can probably be fixed by changing the call to use TextTestResult
instead, unless you know of a good reason not to?
Fixed by https://github.com/tomchristie/django-pdb/commit/62388de031d4e330ef75629d79121c9d5b448999
Pushed to PyPI
Thanks!
Steps to reproduce:
The following traceback is generated:
This can be fixed in one of two ways:
from django.utils import unittest
instead ofimport unittest
, and depending on Django >= 1.3.if sys.version_info[:2] < (2, 7): import unittest2 as unittest
and depending on unittest2 if Python version is less than 2.7.