|
@@ -30,7 +30,7 @@ from django.test.utils import setup_test_environment
|
|
|
from django.test.utils import teardown_databases as _teardown_databases
|
|
|
from django.test.utils import teardown_test_environment
|
|
|
from django.utils.datastructures import OrderedSet
|
|
|
-from django.utils.version import PY312
|
|
|
+from django.utils.version import PY312, PY313
|
|
|
|
|
|
try:
|
|
|
import ipdb as pdb
|
|
@@ -126,7 +126,10 @@ class PDBDebugResult(unittest.TextTestResult):
|
|
|
self.buffer = False
|
|
|
exc_type, exc_value, traceback = error
|
|
|
print("\nOpening PDB: %r" % exc_value)
|
|
|
- pdb.post_mortem(traceback)
|
|
|
+ if PY313:
|
|
|
+ pdb.post_mortem(exc_value)
|
|
|
+ else:
|
|
|
+ pdb.post_mortem(traceback)
|
|
|
|
|
|
|
|
|
class DummyList:
|