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

Method test_choices_negative_total

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

choicesMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected