docstr: When target_capacity doesn't change, return the current direction.
docstr_tok: ["When","target_capacity","does","n't","change",",","return","the","current","direction","."]
code: def test_no_change_target_capacity(
      self, target_capacity, curr_direction
  ):
      """When target_capacity doesn't change, return the current direction."""
  
      if target_capacity is None:
          # When target_capacity is None, the current direction must be None.
          curr_direction = None
  
      curr_config = ServeDeploySchema(
          target_capacity=target_capacity,
          applications=[
              create_app_config(name="app1"),
              create_app_config(name="app2"),
              create_app_config(name="app3"),
          ],
      )
  
      assert (
          calculate_target_capacity_direction(
              curr_config,
              curr_config,
              curr_direction,
          )
          == curr_direction
      )
  
file_path: ray/python/ray/serve/tests/unit/test_controller.py
imports: from copy import deepcopy
  import pytest
  from ray.serve._private.common import TargetCapacityDirection
  from ray.serve._private.controller import applications_match, calculate_target_capacity_direction
  from ray.serve.schema import HTTPOptionsSchema, ServeApplicationSchema, ServeDeploySchema
label_desc: Use image node_id 2 for calling the TestCalculateScaleDirection obj's underlying member method code with example usage: obj.test_no_change_target_capacity(target_capacity, curr_direction) without return types