class_docstr: Tests for ConcurrencyCapBackpressurePolicy.
class_docstr_tok: ["Tests","for","ConcurrencyCapBackpressurePolicy","."]
code: def test_config(self):
      topology = {}
      # Test good config.
      with self._patch_config(10, 0.3, 1.5):
          policy = ConcurrencyCapBackpressurePolicy(topology)
          self.assertEqual(policy._init_cap, 10)
          self.assertEqual(policy._cap_multiply_threshold, 0.3)
          self.assertEqual(policy._cap_multiplier, 1.5)
  
      with self._patch_config(10, 0.3, 1):
          policy = ConcurrencyCapBackpressurePolicy(topology)
          self.assertEqual(policy._init_cap, 10)
          self.assertEqual(policy._cap_multiply_threshold, 0.3)
          self.assertEqual(policy._cap_multiplier, 1)
  
      # Test bad configs.
      with self._patch_config(-1, 0.3, 1.5):
          with self.assertRaises(AssertionError):
              policy = ConcurrencyCapBackpressurePolicy(topology)
      with self._patch_config(10, 1.1, 1.5):
          with self.assertRaises(AssertionError):
              policy = ConcurrencyCapBackpressurePolicy(topology)
      with self._patch_config(10, 0.3, 0.5):
          with self.assertRaises(AssertionError):
              policy = ConcurrencyCapBackpressurePolicy(topology)
  
imports: import functools
  import time
  import unittest
  from collections import defaultdict
  from contextlib import contextmanager
  from unittest.mock import MagicMock, patch
  import numpy
  import pytest
  import ray
  from ray.data._internal.execution.backpressure_policy import ENABLED_BACKPRESSURE_POLICIES_CONFIG_KEY, ConcurrencyCapBackpressurePolicy, StreamingOutputBackpressurePolicy
  from ray.data.tests.conftest import restore_data_context
  from ray.data.tests.conftest import CoreExecutionMetrics, assert_core_execution_metrics_equals, get_initial_core_execution_metrics_snapshot
  from ray.tests.conftest import shutdown_only
label_desc: Use image node_id 5 for calling the TestConcurrencyCapBackpressurePolicy obj's underlying member method code with example usage: obj.test_config() without return types