mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-11837 nose test runner errors while formatting a test error
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from tcmessages import TeamcityServiceMessages
|
||||
import sys, traceback, datetime
|
||||
import sys
|
||||
import traceback
|
||||
import datetime
|
||||
import unittest
|
||||
|
||||
from tcmessages import TeamcityServiceMessages
|
||||
from tcunittest import strclass
|
||||
from tcunittest import TeamcityTestResult
|
||||
|
||||
|
||||
try:
|
||||
from nose.util import isclass # backwards compat
|
||||
from nose.config import Config
|
||||
@@ -59,7 +63,10 @@ class TeamcityPlugin(ErrorClassPlugin, TextTestResult, TeamcityTestResult):
|
||||
def formatErr(self, err):
|
||||
exctype, value, tb = err
|
||||
if isinstance(value, str):
|
||||
value = exctype(value)
|
||||
try:
|
||||
value = exctype(value)
|
||||
except TypeError:
|
||||
pass
|
||||
return ''.join(traceback.format_exception(exctype, value, tb))
|
||||
|
||||
def is_gen(self, test):
|
||||
|
||||
Reference in New Issue
Block a user