Exemplo n.º 1
0
    def test_exit_surface(self):
        thing = Surface(self.game, "tray")
        thing.moveTo(self.start_room)
        self.game.me.moveTo(thing)

        self.game.turnMain("exit")

        self.assertFalse(thing.containsItem(self.game.me),
                         "Player should have left the Container")
Exemplo n.º 2
0
 def test_set_surface_on_itself(self):
     item = Surface(self.game, "thing")
     item.moveTo(self.start_room)
     self.game.turnMain("set thing on thing")
     self.assertIn("You cannot", self.app.print_stack.pop())
     self.assertFalse(item.containsItem(item))