mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-28893: Sync with teamcity-messages
+test added Convert objects and message in diff to string
This commit is contained in:
@@ -2,6 +2,8 @@ import pprint
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from .messages import text_type
|
||||
|
||||
_PY2K = sys.version_info < (3,)
|
||||
_PRIMITIVES = [int, str, bool]
|
||||
if _PY2K:
|
||||
@@ -52,12 +54,12 @@ class EqualsAssertionError(AssertionError):
|
||||
super(AssertionError, self).__init__()
|
||||
self.expected = expected
|
||||
self.actual = actual
|
||||
self.msg = msg
|
||||
self.msg = text_type(msg)
|
||||
|
||||
if not preformated:
|
||||
self.expected = _format_and_convert(self.expected)
|
||||
self.actual = _format_and_convert(self.actual)
|
||||
self.msg = msg if msg else ""
|
||||
self.msg = text_type(msg) if msg else ""
|
||||
|
||||
self.expected = _STR_F(self.expected)
|
||||
self.actual = _STR_F(self.actual)
|
||||
|
||||
@@ -152,7 +152,7 @@ class TeamcityServiceMessages(object):
|
||||
diff_message = u"\n{0} != {1}\n".format(comparison_failure.actual, comparison_failure.expected)
|
||||
self.message('testFailed',
|
||||
name=testName,
|
||||
message=message + text_type(diff_message),
|
||||
message=text_type(message) + text_type(diff_message),
|
||||
details=details,
|
||||
flowId=flowId,
|
||||
type="comparisonFailure",
|
||||
|
||||
Reference in New Issue
Block a user