Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_all_monsters_load_monsters_json(path_to_docs_dir: Path):
path_to_monsters_json_dir_no_slash = path_to_docs_dir / "monsters-json"
path_to_monsters_json_dir_slash = os.path.join(path_to_docs_dir, "monsters-json", "")
for path in (path_to_monsters_json_dir_slash, path_to_monsters_json_dir_no_slash):
all_db_monsters = all_monsters.AllMonsters(str(path))
assert len(all_db_monsters.all_monsters) == NUMBER_OF_MONSTERS
def test_all_monsters_load_monsters_complete(path_to_docs_dir: Path):
path_to_monsters_complete = path_to_docs_dir / "monsters-complete.json"
all_db_monsters = all_monsters.AllMonsters(str(path_to_monsters_complete))
assert len(all_db_monsters.all_monsters) == NUMBER_OF_MONSTERS
def load() -> all_monsters.AllMonsters:
"""Load the osrsbox monster database.
:return: An AllMonsters object containing the entire monster database.
"""
return all_monsters.AllMonsters()