def test_roll_one_dice(): actual = len(GameLogic().roll_dice(1)) result = GameLogic().roll_dice(1) expected = 1 range =True for i in result: if i > 6 or i <1: range= False assert actual == expected assert (range == True),'The value of the dice is not between 1 to 6'
def test_length(): game_logic = GameLogic() actual = len(game_logic.roll_dice(5)) expected = 5 assert actual == expected
def test_value(): game_logic = GameLogic() actual = game_logic.roll_dice(5) for i in actual: assert isinstance(i, int) assert 1 <= i <= 6