909
909
if not s.endswith(suffix):
910
910
raise AssertionError('string %r does not end with %r' % (s, suffix))
912
def assertContainsRe(self, haystack, needle_re, flags=0):
913
913
"""Assert that a contains something matching a regular expression."""
915
915
if '\n' in haystack or len(haystack) > 60:
916
916
# a long string, format it in a more readable way