Beispiel #1
0
def test_sell():
    p = Player(100)
    r = RealState(50, 5)

    r.sell_to(p)

    assert r.owner_is(p)
    assert p.balance == 50
Beispiel #2
0
def test_sell_error():
    p1, p2 = Player(100), Player(0)
    r = RealState(50, 5, owner=p2)

    with pytest.raises(AssertionError):
        r.sell_to(p1)