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

Method test_choices_negative_total

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

Source from the content-addressed store, hash-verified

350 self.gen.choices('AB', [0.0, 0.0])
351
352 def test_choices_negative_total(self):
353 with self.assertRaises(ValueError):
354 self.gen.choices('ABC', [3, -5, 1])
355
356 def test_choices_infinite_total(self):
357 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 2

choicesMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected