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

Method test_mul

Lib/test/string_tests.py:1343–1353  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1341 slice(start, stop, step))
1342
1343 def test_mul(self):
1344 super().test_mul()
1345 self.checkequal('', 'abc', '__mul__', -1)
1346 self.checkequal('', 'abc', '__mul__', 0)
1347 self.checkequal('abc', 'abc', '__mul__', 1)
1348 self.checkequal('abcabcabc', 'abc', '__mul__', 3)
1349 self.checkraises(TypeError, 'abc', '__mul__')
1350 self.checkraises(TypeError, 'abc', '__mul__', '')
1351 # XXX: on a 64-bit system, this doesn't raise an overflow error,
1352 # but either raises a MemoryError, or succeeds (if you have 54TiB)
1353 #self.checkraises(OverflowError, 10000*'abc', '__mul__', 2000000000)
1354
1355 def test_join(self):
1356 # join now works with any sequence type

Callers

nothing calls this directly

Calls 4

superClass · 0.85
test_mulMethod · 0.45
checkequalMethod · 0.45
checkraisesMethod · 0.45

Tested by

no test coverage detected