<filename>metadrive/tests/test_component/test_asset_loader.py<gh_stars>100-1000
from metadrive import MetaDriveEnv
from metadrive.engine.asset_loader import initialize_asset_loader, AssetLoader
from metadrive.engine.core.engine_core import EngineCore


def test_asset_loader():
    default_config = MetaDriveEnv.default_config()
    world = EngineCore(global_config=default_config)
    try:
        world.clear_world()
        initialize_asset_loader(world)
        print(AssetLoader.asset_path)
        print(AssetLoader.file_path("aaa"))
    # print(AssetLoader.get_loader())
    finally:
        world.close_world()


if __name__ == '__main__':
    test_asset_loader()

<filename>metadrive/tests/test_component/test_asset_loader.py<gh_stars>100-1000
from metadrive import MetaDriveEnv
from metadrive.engine.asset_loader import initialize_asset_loader, AssetLoader
from metadrive.engine.core.engine_core import EngineCore


def test_asset_loader():
    default_config = MetaDriveEnv.default_config()
    world = EngineCore(global_config=default_config)
    try:
        world.clear_world()
        initialize_asset_loader(world)
        print(AssetLoader.asset_path)
        print(AssetLoader.file_path("aaa"))
    # print(AssetLoader.get_loader())
    finally:
        world.close_world()


if __name__ == '__main__':
    test_asset_loader()

# print(AssetLoader.get_loader())