mirror of https://github.com/Malphaet/minitest.git
Upgraded the two core:critical to make them way more readable
This commit is contained in:
parent
5d1695b3a8
commit
5963ac7792
|
|
@ -271,13 +271,14 @@ class simpleTestUnit(testUnit):
|
|||
if len(self.list_ongoing_tests)>0:
|
||||
self.addFailure(e)
|
||||
else:
|
||||
self.criticalTraceback()
|
||||
#self.criticalTraceback() #This is an arguable choice
|
||||
self.addResult("minitest.py:error",CRITICAL_STATUS,e)
|
||||
return self.results
|
||||
|
||||
def criticalTraceback(self):
|
||||
exc,funct,tb=sys.exc_info()
|
||||
code=tb.tb_frame.f_code
|
||||
self.addCritical("core:critical","fatal error {} line {} ({}@{})".format(exc.__name__,code.co_firstlineno,code.co_name,code.co_filename))
|
||||
self.addCritical("minitest.py:critical","fatal error {} line {} ({}@{})".format(exc.__name__,code.co_firstlineno,code.co_name,code.co_filename))
|
||||
# #print(traceback.extract_stack()[0])
|
||||
# # print(stack.name)
|
||||
# for stack in traceback.extract_stack():
|
||||
|
|
|
|||
Loading…
Reference in New Issue