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

Method assertStartsWith

Lib/test/support/testcase.py:39–43  ·  view source on GitHub ↗
(self, s, prefix, msg=None)

Source from the content-addressed store, hash-verified

37 self.fail(self._formatMessage(msg, standardMsg))
38
39 def assertStartsWith(self, s, prefix, msg=None):
40 if s.startswith(prefix):
41 return
42 standardMsg = f"{s!r} doesn't start with {prefix!r}"
43 self.fail(self._formatMessage(msg, standardMsg))
44
45 def assertNotStartsWith(self, s, prefix, msg=None):
46 if not s.startswith(prefix):

Calls 3

_formatMessageMethod · 0.80
startswithMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected