  
  
  def test_issue4707():
      """Tests that disabled component names are also excluded from nlp.from_disk
      by default when loading a model.
      """
      nlp = English()
      nlp.add_pipe("sentencizer")
 
</s> remove         if name in self.pipe_names:
            raise ValueError(Errors.E007.format(name=name, opts=self.pipe_names))
 </s> add         if name in self._pipe_names:
            raise ValueError(Errors.E007.format(name=name, opts=self._pipe_names)) </s> remove         current, self.nlp.pipeline = self.nlp.pipeline, self.original_pipeline
        unexpected = [name for name, pipe in current if not self.nlp.has_pipe(name)]
        if unexpected:
            # Don't change the pipeline if we're raising an error.
            self.nlp.pipeline = current
            raise ValueError(Errors.E008.format(names=unexpected))
        self.nlp._pipe_meta.update(self.metas)
        self.nlp._pipe_configs.update(self.configs)
 </s> add         for name in self.names:
            self.nlp.enable_pipe(name)
        # TODO: maybe add some more checks / catch errors that may occur if
        # user removes a disabled pipe in the with block </s> remove         # Important! Not deep copy -- we just want the container (but we also
        # want to support people providing arbitrarily typed nlp.pipeline
        # objects.)
        self.original_pipeline = copy(nlp.pipeline)
        self.metas = {name: nlp.get_pipe_meta(name) for name in names}
        self.configs = {name: nlp.get_pipe_config(name) for name in names}
 </s> add         for name in self.names:
            self.nlp.disable_pipe(name) </s> remove         self.pipeline = []
 </s> add         self._pipeline = []
        self._disabled = set()
@pytest.mark.skip(reason="API change: disable just disables, new exclude arg")
  
  
@pytest.mark.skip(reason="API change: disable just disables, new exclude arg")
  def test_issue4707():
      """Tests that disabled component names are also excluded from nlp.from_disk
      by default when loading a model.
      """
      nlp = English()
      nlp.add_pipe("sentencizer")
keep add keep keep keep keep keep keep
 Allow loaded but disabled components 
spacy/tests/regression/test_issue4501-5000.py