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

Method test_sample_on_sets

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

Source from the content-addressed store, hash-verified

182 self.assertRaises(TypeError, self.gen.sample, dict.fromkeys('abcdef'), 2)
183
184 def test_sample_on_sets(self):
185 with self.assertRaises(TypeError):
186 population = {10, 20, 30, 40, 50, 60, 70}
187 self.gen.sample(population, k=5)
188
189 def test_sample_on_seqsets(self):
190 class SeqSet(abc.Sequence, abc.Set):

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45
sampleMethod · 0.45

Tested by

no test coverage detected