      {'setter': lambda: None},
      {'default': None, 'method': lambda: None},
      {'getter': True}])
  def test_underscore_raises_for_invalid(invalid_kwargs):
      doc = Doc(Vocab(), words=['hello', 'world'])
      with pytest.raises(ValueError):
          doc.set_extension('test', **invalid_kwargs)
  
  
 
</s> remove         doc.set_extension('test', **invalid_kwargs, force=True)
 </s> add         doc.set_extension('test', **invalid_kwargs) </s> remove     doc.set_extension('test', **valid_kwargs, force=True)
 </s> add     doc.set_extension('test', **valid_kwargs)
    invalid_kwargs['force'] = True
      {'setter': lambda: None},
      {'default': None, 'method': lambda: None},
      {'getter': True}])
  def test_underscore_raises_for_invalid(invalid_kwargs):
    invalid_kwargs['force'] = True
      doc = Doc(Vocab(), words=['hello', 'world'])
      with pytest.raises(ValueError):
          doc.set_extension('test', **invalid_kwargs)
  
  
keep keep keep add keep keep keep keep keep
 Fix tests for Python 2 
spacy/tests/test_underscore.py