在运行时:Django的manage.py测试
./manage.py test appname
如何禁用所有的统计/日志/ “确定” 后输出?
- 我已经评论了整个日志记录部分 - 没有运气。
- 还评论了任何print_stat调用 - 没有运气
- 我的manage.py是相当裸露的,所以它可能不是这样。
我运行了很多测试,并不断滚动上千终端线路查看结果。 显然,我是Python/Django的新手,它是测试框架,所以我很感激任何帮助。
----------------------------------------------------------------------
Ran 2 tests in 2.133s
OK
1933736 function calls (1929454 primitive calls) in 2.133 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 2.133 2.133 <string>:1(<module>)
30 0.000 0.000 0.000 0.000 <string>:8(__new__)
4 0.000 0.000 0.000 0.000 Cookie.py:315(_quote)
26 0.000 0.000 0.000 0.000 Cookie.py:333(_unquote)
10 0.000 0.000 0.000 0.000 Cookie.py:432(__init__)
28 0.000 0.000 0.000 0.000 Cookie.py:441(__setitem__)
.
.
.
2 0.000 0.000 0.000 0.000 {time.gmtime}
18 0.000 0.000 0.000 0.000 {time.localtime}
18 0.000 0.000 0.000 0.000 {time.strftime}
295 0.000 0.000 0.000 0.000 {time.time}
556 0.000 0.000 0.000 0.000 {zip}
如果有帮助,我输入:
from django.utils import unittest
class TestEmployeeAdd(unittest.TestCase):
def setUp(self):
我不明白你想要删除什么。 –
“OK”下面的所有内容。基本上我不想看到任何统计数据。我只想看看测试是否通过或失败。 – Brice
你在Linux/Unix或类似的shell? –