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

Method test_count

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

Source from the content-addressed store, hash-verified

92
93 @bigmemtest(size=_2G, memuse=2)
94 def test_count(self, size):
95 _ = self.from_latin1
96 SUBSTR = _(' abc def ghi')
97 s = _('.') * size + SUBSTR
98 self.assertEqual(s.count(_('.')), size)
99 s += _('.')
100 self.assertEqual(s.count(_('.')), size + 1)
101 self.assertEqual(s.count(_(' ')), 3)
102 self.assertEqual(s.count(_('i')), 1)
103 self.assertEqual(s.count(_('j')), 0)
104
105 @bigmemtest(size=_2G, memuse=2)
106 def test_endswith(self, size):

Callers

nothing calls this directly

Calls 3

_Function · 0.70
assertEqualMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected