From c646924f03e67e74a44c6f9b2341a4e5a6c298c6 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 14 Sep 2020 11:00:39 +0200 Subject: [PATCH] tests: remove occasionally-failing PythonUtil.weightedChoice test It does not test a behavior of this function that we support, anyway. --- tests/showbase/test_PythonUtil.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/showbase/test_PythonUtil.py b/tests/showbase/test_PythonUtil.py index c4c1b8076a..6b9d50cde0 100644 --- a/tests/showbase/test_PythonUtil.py +++ b/tests/showbase/test_PythonUtil.py @@ -146,14 +146,6 @@ def test_weighted_choice(): # Assert that we got 'item1'. assert item == items[0] - # Test PythonUtil.weightedChoice() with an invalid sum. - # This time, we're using 2000 so that regardless of the random - # number, we will still reach the very last item. - item = PythonUtil.weightedChoice(choicelist, sum=100000) - - # Assert that we got 'item8', since we would get the last item. - assert item == items[-1] - # Create a bogus random function. rnd = lambda: 0.5