Add quotes around expected/actual string in assertion message

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-08-21 20:57:44 +02:00
parent 7fe4d2ff39
commit 6d09d8fe13

View file

@ -63,14 +63,14 @@ class TestCase(BaseTestCase):
"tags",
expectedTags,
description,
"{} of {} do not match (expected: {}, actual: {})")
"{} of {} do not match (expected: '{}', actual: '{}')")
if expectedAnnotation:
self.assertKeyExists(interval, "annotation", description, "{} is not annotated")
self.assertIntervalValue(interval,
"annotation",
expectedAnnotation,
description,
"{} of {} do not match (expected: {}, actual: {})")
"{} of {} do not match (expected: '{}', actual: '{}')")
def assertKeyExists(self, interval, key, description, message):
self.assertTrue(key in interval, message.format(description))
@ -86,7 +86,7 @@ class TestCase(BaseTestCase):
key,
expected,
description,
"{} time of {} does not match (expected: {}, actual: {})")
"{} time of {} does not match (expected: '{}', actual: '{}')")
def assertIntervalValue(self, interval, key, expected, description, message):
actual = interval[key]