docstr: If runtime env is specified in all three places:
  - In code
  - In the config at the deployment level
  - In the config at the application level
  The one specified in the config at the deployment level should take precedence.
docstr_tok: ["If","runtime","env","is","specified","in","all","three","places",":","-","In","code","-","In","the","config","at","the","deployment","level","-","In","the","config","at","the","application","level","The","one","specified","in","the","config","at","the","deployment","level","should","take","precedence","."]
code: def test_override_ray_actor_options_5(self):
      """If runtime env is specified in all three places:
      - In code
      - In the config at the deployment level
      - In the config at the application level
      The one specified in the config at the deployment level should take precedence.
      """
      info = DeploymentInfo(
          route_prefix="/",
          version="123",
          deployment_config=DeploymentConfig(num_replicas=1),
          replica_config=ReplicaConfig.create(
              lambda x: x,
              ray_actor_options={
                  "runtime_env": {"working_dir": "s3://A"}
              },
          ),
          start_time_ms=0,
          deployer_job_id="",
      )
      config = ServeApplicationSchema(
          name="default",
          import_path="test.import.path",
          runtime_env={"working_dir": "s3://C"},
          deployments=[
              DeploymentSchema(
                  name="A",
                  ray_actor_options={
                      "runtime_env": {"working_dir": "s3://B"}
                  },
              )
          ],
      )
  
      updated_infos = override_deployment_info(
          "default", {"A": info}, config
      )
      updated_info = updated_infos["A"]
      assert updated_info.route_prefix == "/"
      assert updated_info.version == "123"
      assert (
          updated_info.replica_config.ray_actor_options["runtime_env"][
              "working_dir"
          ]
          == "s3://B"
      )
  
imports: import sys
  from typing import Dict, List, Tuple
  from unittest.mock import Mock, PropertyMock, patch
  import pytest
  from ray.exceptions import RayTaskError
  from ray.serve._private.application_state import ApplicationState, ApplicationStateManager, override_deployment_info
  from ray.serve._private.common import ApplicationStatus, DeploymentID, DeploymentStatus, DeploymentStatusInfo, DeploymentStatusTrigger
  from ray.serve._private.config import DeploymentConfig, ReplicaConfig
  from ray.serve._private.deploy_utils import deploy_args_to_deployment_info
  from ray.serve._private.deployment_info import DeploymentInfo
  from ray.serve._private.test_utils import MockKVStore
  from ray.serve._private.utils import get_random_string
  from ray.serve.exceptions import RayServeException
  from ray.serve.schema import DeploymentSchema, ServeApplicationSchema
label_desc: Use image node_id 11 for calling the TestOverrideDeploymentInfo obj's underlying member method code with example usage: obj.test_override_ray_actor_options_5() without return types