  
  @pytest.mark.parametrize("text", [["apple", "orange", "juice"]])
  def test_vectors_span_span_similarity(vocab, text):
      doc = Doc(vocab, words=text)
      with pytest.warns(UserWarning):
          assert doc[0:2].similarity(doc[1:3]) == doc[1:3].similarity(doc[0:2])
          assert -1.0 < doc[0:2].similarity(doc[1:3]) < 1.0
  
  
  @pytest.mark.parametrize("text", [["apple", "orange", "juice"]])
  def test_vectors_span_doc_similarity(vocab, text):
      doc = Doc(vocab, words=text)
 
</s> remove     with pytest.warns(UserWarning):
        assert doc[0:2].similarity(doc) == doc.similarity(doc[0:2])
        assert -1.0 < doc[0:2].similarity(doc) < 1.0
 </s> add     assert doc[0:2].similarity(doc) == doc.similarity(doc[0:2])
    assert -1.0 < doc[0:2].similarity(doc) < 1.0 </s> remove     with pytest.warns(UserWarning):
        assert isinstance(doc[:2].similarity(doc[0]), float)
        assert isinstance(doc[0].similarity(doc[-2]), float)
        assert doc[:2].similarity(doc[0]) == doc[0].similarity(doc[:2])
 </s> add     assert isinstance(doc[:2].similarity(doc[0]), float)
    assert isinstance(doc[0].similarity(doc[:2]), float)
    assert doc[:2].similarity(doc[0]) == doc[0].similarity(doc[:2]) </s> remove     with pytest.warns(UserWarning):
        assert isinstance(doc.similarity(doc[0]), float)
        assert isinstance(doc[0].similarity(doc), float)
        assert doc.similarity(doc[0]) == doc[0].similarity(doc)
 </s> add     assert isinstance(doc.similarity(doc[0]), float)
    assert isinstance(doc[0].similarity(doc), float)
    assert doc.similarity(doc[0]) == doc[0].similarity(doc) </s> remove             warnings.warn(Warnings.W008.format(obj="Token"))
 </s> add             if not self.has_vector or not other.has_vector:
                warnings.warn(Warnings.W008.format(obj="Token")) </s> remove             warnings.warn(Warnings.W008.format(obj="Span"))
 </s> add             if not self.has_vector or not other.has_vector:
                warnings.warn(Warnings.W008.format(obj="Span"))
    assert doc[0:2].similarity(doc[1:3]) == doc[1:3].similarity(doc[0:2])
    assert -1.0 < doc[0:2].similarity(doc[1:3]) < 1.0
  
  @pytest.mark.parametrize("text", [["apple", "orange", "juice"]])
  def test_vectors_span_span_similarity(vocab, text):
      doc = Doc(vocab, words=text)
    assert doc[0:2].similarity(doc[1:3]) == doc[1:3].similarity(doc[0:2])
    assert -1.0 < doc[0:2].similarity(doc[1:3]) < 1.0
    assert doc[0:2].similarity(doc[1:3]) == doc[1:3].similarity(doc[0:2])
    assert -1.0 < doc[0:2].similarity(doc[1:3]) < 1.0
    assert doc[0:2].similarity(doc[1:3]) == doc[1:3].similarity(doc[0:2])
    assert -1.0 < doc[0:2].similarity(doc[1:3]) < 1.0
  
  
  @pytest.mark.parametrize("text", [["apple", "orange", "juice"]])
  def test_vectors_span_doc_similarity(vocab, text):
      doc = Doc(vocab, words=text)
keep keep keep keep replace replace replace keep keep keep keep keep
 Update vector handling in similarity methods (#11013)

Distinguish between vectors that are 0 vs. missing vectors when warning
about missing vectors.

Update `Doc.has_vector` to match `Span.has_vector` and
`Token.has_vector` for cases where the vocab has vectors but none of the
tokens in the container have vectors. 
spacy/tests/vocab_vectors/test_vectors.py