def other_character(): """Create another Character instance for all tests to share.""" _character = Character(savable=False) _character.active = True _character.name = "Target" _character.session = _other_session return _character
def test_room_chars(self): """Test that a room's character list functions properly.""" assert not self.room.chars char = Character() char.resume(quiet=True) char.room = self.room assert set(self.room.chars) == {char} del Character._caches[char.get_key_name()][char.key] del char gc.collect() assert not self.room.chars
def test_character_create(self): """Test that we can create a new character instance.""" assert Character()
def character(): """Create a Character instance for all tests to share.""" return Character(savable=False)