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

Method test_endswith

Lib/test/test_bigmem.py:105–114  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

103
104 @bigmemtest(size=_2G, memuse=2)
105 def test_endswith(self, size):
106 _ = self.from_latin1
107 SUBSTR = _(' abc def ghi')
108 s = _('-') * size + SUBSTR
109 self.assertTrue(s.endswith(SUBSTR))
110 self.assertTrue(s.endswith(s))
111 s2 = _('...') + s
112 self.assertTrue(s2.endswith(s))
113 self.assertFalse(s.endswith(_('a') + SUBSTR))
114 self.assertFalse(SUBSTR.endswith(s))
115
116 @bigmemtest(size=_2G + 10, memuse=2)
117 def test_expandtabs(self, size):

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
assertFalseMethod · 0.80
_Function · 0.70
endswithMethod · 0.45

Tested by

no test coverage detected