code: def test_config_added_raises():
      ex = Experiment("exp")
      ex.main(lambda: None)
  
      with pytest.raises(
          ConfigAddedError,
          match=r"Added new config entry that is not used anywhere.*\n"
          r"\s*Conflicting configuration values:\n"
          r"\s*a=42",
      ):
          ex.run(config_updates={"a": 42})
  
file_path: sacred/tests/test_exceptions.py
imports: import re
  from sacred import Ingredient, Experiment
  from sacred.utils import CircularDependencyError, ConfigAddedError, MissingConfigError, NamedConfigNotFoundError, format_filtered_stacktrace, format_sacred_error, SacredError
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_config_added_raises() without return types