運行時:./manage.py test appname單擊“確定”后如何禁用所有統計信息/日志記錄/輸出?我已經注釋掉了整個日志記錄部分,沒有運氣。還注釋掉了所有print_stat調用-沒運氣我的manage.py非常裸露,所以可能不是這樣。我進行了許多測試,并且經常不得不向上滾動數千條端子線來查看結果。顯然,我是Python / Django的新手,而且它是測試框架,因此,我將不勝感激。----------------------------------------------------------------------Ran 2 tests in 2.133sOK 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 unittestclass TestEmployeeAdd(unittest.TestCase): def setUp(self):
添加回答
舉報
0/150
提交
取消