How to use the osrsbox.monsters_api.all_monsters function in osrsbox

To help you get started, we’ve selected a few osrsbox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github osrsbox / osrsbox-db / test / test_monsters_api.py View on Github external
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
github osrsbox / osrsbox-db / test / test_monsters_api.py View on Github external
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
github osrsbox / osrsbox-db / osrsbox / monsters_api / __init__.py View on Github external
def load() -> all_monsters.AllMonsters:
    """Load the osrsbox monster database.

    :return: An AllMonsters object containing the entire monster database.
    """
    return all_monsters.AllMonsters()