예제 #1
0
def test_take_and_drop_leaflet_and_mat_then_look():
    adventure = Adventure()
    adventure.open(['mailbox'])
    adventure.take(['leaflet', 'mat'])
    adventure.drop(['mat', 'leaflet'])
    assert(adventure.look([]) == """**West of House**
This is an open field west of a white house, with a boarded front door.
There is a small mailbox, a welcome mat, and a small leaflet here.""")
예제 #2
0
def test_open_mailbox_and_look():
    adventure = Adventure()
    adventure.open(['mailbox'])
    assert(adventure.look([]) == """**West of House**
This is an open field west of a white house, with a boarded front door.
There is a small mailbox here.
The mailbox contains:
- A small leaflet.
A rubber mat saying 'Welcome to Zork!' lies by the door.""")