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

Method test_count

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

Source from the content-addressed store, hash-verified

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