MCPcopy Index your code
hub / github.com/RustPython/RustPython / assertEndsWith

Method assertEndsWith

Lib/test/support/testcase.py:50–54  ·  view source on GitHub ↗
(self, s, suffix, msg=None)

Source from the content-addressed store, hash-verified

48 self.fail(self._formatMessage(msg, f"{s!r} starts with {prefix!r}"))
49
50 def assertEndsWith(self, s, suffix, msg=None):
51 if s.endswith(suffix):
52 return
53 standardMsg = f"{s!r} doesn't end with {suffix!r}"
54 self.fail(self._formatMessage(msg, standardMsg))
55
56 def assertNotEndsWith(self, s, suffix, msg=None):
57 if not s.endswith(suffix):

Callers 15

test_exception_tableMethod · 0.45
assertSigIntMethod · 0.45
test_reprMethod · 0.45
test_reprMethod · 0.45
do_testMethod · 0.45

Calls 3

_formatMessageMethod · 0.80
endswithMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected