我正在使用基于django.test.TestCase的类方法来测试我的django应用程序。当我执行测试时,它只显示通过的测试数量。我应该怎么做才能在控制台上得到哪些测试通过了,哪些测试失败了的输出,就像Proboscis框架的输出一样。http://packages.python.org/proboscis/
生成这样的输出..
$ python run_tests.py
test_should_return_false_for_positive_numbers (tests.examples.unit.tests.unit.TestIsNegative) ... ok
test_should_return_false_for_zero (tests.examples.unit.tests.unit.TestIsNegative) ... ok
test_should_return_true_for_negative_numbers (tests.examples.unit.tests.unit.TestIsNegative) ... ok
Make sure our complex string reversal logic works. ... ok
----------------------------------------------------------------------
Ran 4 tests in 0.001s
OK但是试探器不能捕获基于django.tests.TestCase类的测试。请给我提个建议,我现在该怎么办?
发布于 2013-01-23 17:16:13
使用verbosity选项运行测试
python manage.py test --verbosity=2 app1 app2
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose outputhttps://stackoverflow.com/questions/14475760
复制相似问题