docstr: Makes sure include and exclude arguments are validated and raises
  expected exception on error
docstr_tok: ["Makes","sure","include","and","exclude","arguments","are","validated","and","raises","expected","exception","on","error"]
code: def test_include_exclude_validation(self):
      """Makes sure include and exclude arguments are validated and raises
      expected exception on error
      """
      base = BasePipelineMock()
      dataset_properties = {"target_type": "classification"}
      base.dataset_properties = dataset_properties
      base.steps = [
          (
              "p0",
              feature_preprocessing.FeaturePreprocessorChoice(
                  dataset_properties
              ),
          ),
          (
              "p1",
              feature_preprocessing.FeaturePreprocessorChoice(
                  dataset_properties
              ),
          ),
          (
              "c",
              classification.ClassifierChoice(dataset_properties),
          ),
      ]
  
      def assert_value_error(include=None, exclude=None):
          base.include = include
          base.exclude = exclude
          with self.assertRaises(ValueError):
              base._validate_include_exclude_params()
  
      # Same key in include and exclude argument
      assert_value_error(
          include={"c": ["adaboost"]}, exclude={"c": ["sgd"]}
      )
  
      # Invalid key in the exclude argument
      assert_value_error(exclude={"p2": ["pca"]})
  
      # Invalid value type for the key in the include argument
      assert_value_error(
          include={"c": ("adaboost", "sgd")}, exclude=None
      )
  
      # Empty list of the key in the include argument
      assert_value_error(include={"c": []})
  
      # Invalid component in the list value for the key in the include argument
      assert_value_error(include={"c": ["pca"]})
  
      # Case when all conditions passed for include and exclude
      base.include = {"c": ["adaboost", "sgd"]}
      base.exclude = {"p1": ["pca"]}
      self.assertIsNone(base._validate_include_exclude_params())
  
file_path: auto-sklearn/test/test_pipeline/test_base.py
imports: from typing import Optional
  import ConfigSpace.configuration_space
  import autosklearn.pipeline.base
  import autosklearn.pipeline.components.base
  import autosklearn.pipeline.components.classification
  import autosklearn.pipeline.components.feature_preprocessing
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  import unittest
  import unittest.mock
label_desc: Use image node_id 3 for calling the BaseTest obj's underlying member method code with example usage: obj.test_include_exclude_validation() without return types