зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1125834 - Don't print class name of Marionette exceptions twice. r=automatedtester
MozReview-Commit-ID: 6ctHHB8uDZm --HG-- extra : rebase_source : 61ef531649b45e77dd3cb8358b635e95c5e82253
This commit is contained in:
Родитель
298a81fa15
Коммит
756831a9ce
|
@ -49,7 +49,10 @@ class MarionetteException(Exception):
|
|||
st = "".join(["\t%s\n" % x for x in self.stacktrace.splitlines()])
|
||||
msg += "\nstacktrace:\n%s" % st
|
||||
|
||||
return "".join(traceback.format_exception(self.__class__, msg, tb)).strip()
|
||||
if tb:
|
||||
msg += ': ' + "".join(traceback.format_tb(tb))
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
class ElementNotSelectableException(MarionetteException):
|
||||
|
|
|
@ -38,7 +38,6 @@ class TestErrors(marionette_test.MarionetteTestCase):
|
|||
self.assertIn(message, r)
|
||||
self.assertIn(", caused by %r" % cause[0], r)
|
||||
self.assertIn("\nstacktrace:\n\tfirst\n\tsecond", r)
|
||||
self.assertIn("MarionetteException:", r)
|
||||
|
||||
def test_cause_string(self):
|
||||
exc = errors.MarionetteException(cause="foo")
|
||||
|
|
Загрузка…
Ссылка в новой задаче