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

Method test_sample_on_sets

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

sampleMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected