# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). # All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause """Tests for the project's task registrations.""" import importlib import gymnasium as gym import TwoFootBot_isaaclab.tasks # noqa: F401 def test_task_registrations(): """The migrated MLP tasks must expose their environment and agent configurations.""" for task_id, env_cfg, agent_cfg in ( ( "Template-Twofootbot-mlp-v0", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.Lv0:TwofootbotdemoEnvCfg", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.agents.rsl_rl_ppo_cfg:PPORunnerCfg", ), ( "Template-Twofootbot-mlp-v1", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.Lv1:Lv1Cfg", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.agents.rsl_rl_ppo_cfg:PPORunnerCfg", ), ( "Template-Twofootbot-mlp-v2", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.Lv2:Lv2Cfg", "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.agents.rsl_rl_ppo_cfg:PPORunnerCfg", ), ): spec = gym.spec(task_id) assert spec.kwargs["env_cfg_entry_point"] == env_cfg assert spec.kwargs["rsl_rl_cfg_entry_point"] == agent_cfg lv2_module = importlib.import_module( "TwoFootBot_isaaclab.tasks.manager_based.twofootbot.Lv2" ) assert hasattr(lv2_module, "Lv2Cfg")