示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 def test_room_create(self):
     """Test that we can create a room."""
     type(self).room = Room()
示例#4
0
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
示例#5
0
def room():
    """Create a Room instance for all tests to share."""
    return Room({"x": 0, "y": 0, "z": 0}, savable=False)
示例#6
0
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