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

Method test_expandtabs

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

Source from the content-addressed store, hash-verified

115
116 @bigmemtest(size=_2G + 10, memuse=2)
117 def test_expandtabs(self, size):
118 _ = self.from_latin1
119 s = _('-') * size
120 tabsize = 8
121 self.assertTrue(s.expandtabs() == s)
122 del s
123 slen, remainder = divmod(size, tabsize)
124 s = _(' \t') * slen
125 s = s.expandtabs(tabsize)
126 self.assertEqual(len(s), size - remainder)
127 self.assertEqual(len(s.strip(_(' '))), 0)
128
129 @bigmemtest(size=_2G, memuse=2)
130 def test_find(self, size):

Callers

nothing calls this directly

Calls 7

lenFunction · 0.85
assertTrueMethod · 0.80
_Function · 0.70
divmodFunction · 0.50
expandtabsMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected