def test_room_exits(self): """Test that room exits function properly.""" assert not self.room.get_exits() another_room = Room() another_room.x, another_room.y, another_room.z = (5, 5, 6) assert self.room.get_exits() == {"up": another_room} del Room._caches[another_room.get_key_name()][another_room.key] del another_room gc.collect() assert not self.room.get_exits()
def test_room_create(self): """Test that we can create a room.""" type(self).room = Room()
def other_room(): """Create another Room instance for all tests to share.""" _room = Room({"x": 1, "y": 0, "z": 0}, savable=False) _room.name = "Another Room" return _room
def room(): """Create a Room instance for all tests to share.""" return Room({"x": 0, "y": 0, "z": 0}, savable=False)