def test_evaluate_advantage_with_multiple_values_in_scalar_array(): operator = Advantage([13, 5, 17]) actual = operator.evaluate() assert actual == 17 assert operator.result == 17 assert actual == operator.result
def test_evaluate_advantage_with_dice_token_value(mocker): mock_random = mocker.patch("dice.tokens.mt_rand") mock_random.side_effect = [5, 17] dice_token = Dice(sides=20, rolls=2) operator = Advantage(dice_token) actual = operator.evaluate() assert actual == 17 assert operator.result == 17 assert actual == operator.result