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

Method _get_teststrings

Lib/test/string_tests.py:93–103  ·  view source on GitHub ↗
(self, charset, digits)

Source from the content-addressed store, hash-verified

91 getattr(obj, methodname)(*args)
92
93 def _get_teststrings(self, charset, digits):
94 base = len(charset)
95 teststrings = set()
96 for i in range(base ** digits):
97 entry = []
98 for j in range(digits):
99 i, m = divmod(i, base)
100 entry.append(charset[m])
101 teststrings.add(''.join(entry))
102 teststrings = [self.fixtype(ts) for ts in teststrings]
103 return teststrings
104
105 def test_add(self):
106 s = self.fixtype('ab')

Callers 5

test_countMethod · 0.95
test_findMethod · 0.95
test_rfindMethod · 0.95
test_indexMethod · 0.95
test_rindexMethod · 0.95

Calls 5

fixtypeMethod · 0.95
setFunction · 0.85
appendMethod · 0.45
addMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected