Esempio 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
Esempio n. 2
0
def test_last_result_is_none():
    d = Die()
    assert_equals(d.peek(), None)
Esempio n. 3
0
def test_last_result_is_also_returned():
    d = Die()
    tempVal = d.roll()
    assert_equals(tempVal, d.peek())
Esempio n. 4
0
def test_roll_is_not_outside_range():
    d = Die()
    d.roll()
    assert d.peek() <= 6
    assert d.peek() >= 1
Esempio n. 5
0
def test_last_result_is_not_none_after_roll():
    d = Die()
    d.roll()
    assert_not_equals(d.peek(), None)