def test_config_overwrite():
    """
    The config in BaseEngine should be the same as env.config, if BaseEngine exists in process
    """
    METADRIVE_DEFAULT_CONFIG["map"] = "S"
    env = MetaDriveEnv({"vehicle_config": dict(show_lidar=False, show_navi_mark=False)})
    try:
        env.reset()
        assert env.current_map.blocks[-1].ID == "S" and len(env.current_map.blocks) == 2
        env.close()
        env = MetaDriveEnv({"map": "C", "vehicle_config": dict(show_lidar=False, show_navi_mark=False)})
        env.reset()
        assert env.current_map.blocks[-1].ID == "C" and len(env.current_map.blocks) == 2
        env.close()
    finally:
        env.close()

    The config in BaseEngine should be the same as env.config, if BaseEngine exists in process
    
metadrive/tests/test_component/test_config.py