mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-03 18:48:27 +00:00
Added deprecation tests for seq2seq generator and RAG Generator (#4782)
This commit is contained in:
parent
896eb6a2ea
commit
dcf3ddddff
@ -5,11 +5,32 @@ from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
from haystack.schema import Document
|
||||
from haystack.nodes.answer_generator import Seq2SeqGenerator, OpenAIAnswerGenerator
|
||||
from haystack.nodes.answer_generator import Seq2SeqGenerator, OpenAIAnswerGenerator, RAGenerator
|
||||
from haystack.pipelines import GenerativeQAPipeline
|
||||
from haystack.nodes import PromptTemplate
|
||||
|
||||
import logging
|
||||
from ..conftest import fail_at_version
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@fail_at_version(1, 18)
|
||||
def test_seq2seq_deprecation():
|
||||
with pytest.warns(DeprecationWarning):
|
||||
try:
|
||||
Seq2SeqGenerator("non_existing_model/model")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@fail_at_version(1, 18)
|
||||
def test_rag_deprecation():
|
||||
with pytest.warns(DeprecationWarning):
|
||||
try:
|
||||
RAGenerator("non_existing_model/model")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user