Beispiel #1
0
 def test_init_generates_all_valid_values(self):
     _test_init_generates_all_valid_values(
         lambda: dice.PairOfDice(),
         11  # Valid results are numbers between 2 and 12
     )
Beispiel #2
0
 def test_is_double_returns_true_for_doubles(self, value):
     d = dice.PairOfDice()
     d.values = (value, value)
     assert d.is_double
Beispiel #3
0
 def test_is_double_returns_false_when_values_are_different(self, value):
     d = dice.PairOfDice()
     d.values = (3, value)
     assert not d.is_double
Beispiel #4
0
 def test_values_getter_and_setter(self):
     d = dice.PairOfDice()
     d.values = 3, 4
     assert d.values == (3, 4)