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

Method test_sample_inputs

Lib/test/test_random.py:174–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

172 self.fail()
173
174 def test_sample_inputs(self):
175 # SF bug #801342 -- population can be any iterable defining __len__()
176 self.gen.sample(range(20), 2)
177 self.gen.sample(range(20), 2)
178 self.gen.sample(str('abcdefghijklmnopqrst'), 2)
179 self.gen.sample(tuple('abcdefghijklmnopqrst'), 2)
180
181 def test_sample_on_dicts(self):
182 self.assertRaises(TypeError, self.gen.sample, dict.fromkeys('abcdef'), 2)

Callers

nothing calls this directly

Calls 2

strFunction · 0.85
sampleMethod · 0.45

Tested by

no test coverage detected