def test_deep_equal_failure_missing_key_without_message(self): actual = { 'an_integer': 32, 'a_string': 'stupendous', 'a_list': ['cat', 'dog', 'mouse'], } expected = { 'an_integer': 32, 'a_string': 'stupendous', 'a_float': 14.342, 'a_list': ['cat', 'dog', 'mouse'], } try: Assert.deep_equal(actual, expected) except AssertionError as e: expected = "expected keys ['a_float'] are absent in actual" Assert.contains(expected, e.msg, )
def test_contains_failure_without_message(self): try: Assert.contains("a", "bcd") except AssertionError as e: Assert.equal(e.msg, "a is not found in bcd. ")