Ejemplo n.º 1
0
def test_die_allows_other_ranges():
    thisMin = 10
    thisMax = 15
    d = Die(10, 15)
    d.roll()
    assert d.peek() <= thisMax
    assert d.peek() >= thisMin
Ejemplo n.º 2
0
def test_last_result_is_none():
    d = Die()
    assert_equals(d.peek(), None)
Ejemplo n.º 3
0
def test_last_result_is_also_returned():
    d = Die()
    tempVal = d.roll()
    assert_equals(tempVal, d.peek())
Ejemplo n.º 4
0
def test_roll_is_not_outside_range():
    d = Die()
    d.roll()
    assert d.peek() <= 6
    assert d.peek() >= 1
Ejemplo n.º 5
0
def test_last_result_is_not_none_after_roll():
    d = Die()
    d.roll()
    assert_not_equals(d.peek(), None)