示例#1
0
def test_counter_two_points():
    counter = Counter()
    counter.add_point(2)
    assert counter.points == 2
示例#2
0
def test_counter_reset_points():
    counter = Counter()
    counter.points = 15
    counter.reset_points()
    assert counter.points == 0
示例#3
0
def test_counter_one_point():
    counter = Counter()
    counter.add_point()
    assert counter.points == 1
示例#4
0
def test_counter_is_zero_when_init():
    counter = Counter()
    assert counter.points == 0
示例#5
0
def test_counter_zero_when_tried_subtract_more_then_i_have():
    counter = Counter()
    counter.points = 1
    counter.subtract_point(3)
    assert counter.points == 0
示例#6
0
def test_counter_subtract_two_points():
    counter = Counter()
    counter.points = 10
    counter.subtract_point(2)
    assert counter.points == 8
示例#7
0
def test_counter_subtract_one_point():
    counter = Counter()
    counter.points = 30
    counter.subtract_point()
    assert counter.points == 29