MCPcopy Index your code
hub / github.com/python/cpython / test_endswith

Method test_endswith

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

Source from the content-addressed store, hash-verified

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