在为 django 运行全套测试时出现此错误:
FAIL: test_error_logging (django_extensions.tests.management_command.CommandTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/lib/jenkins/shiningpanda/jobs/cb5c943f/virtualenvs/d41d8cd9/local/lib/python2.7/site-packages/django_extensions/tests/management_command.py", line 35, in test_error_logging
self.assertEqual(len(handler.messages['error']), 1)
AssertionError: 0 != 1
谁能解释为什么我会得到这个以及如何阻止它?
最佳答案
您描述的行为与此类似 issue在 django-extensions github 页面上。
看起来解决方案是更新到版本 1.0.3
关于python - django 扩展 test_error_logging,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14552986/