mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-10-29 08:49:07 +00:00
fix tests (#5773)
This commit is contained in:
parent
7194343458
commit
24c42b1e03
@ -14,14 +14,14 @@ def test_whisper_local_transcriber(preview_samples_path):
|
|||||||
docs = output["documents"]
|
docs = output["documents"]
|
||||||
assert len(docs) == 3
|
assert len(docs) == 3
|
||||||
|
|
||||||
assert "this is the content of the document." == docs[0].content.strip().lower()
|
assert "this is the content of the document." == docs[0].text.strip().lower()
|
||||||
assert preview_samples_path / "audio" / "this is the content of the document.wav" == docs[0].metadata["audio_file"]
|
assert preview_samples_path / "audio" / "this is the content of the document.wav" == docs[0].metadata["audio_file"]
|
||||||
|
|
||||||
assert "the context for this answer is here." == docs[1].content.strip().lower()
|
assert "the context for this answer is here." == docs[1].text.strip().lower()
|
||||||
assert (
|
assert (
|
||||||
str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute())
|
str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute())
|
||||||
== docs[1].metadata["audio_file"]
|
== docs[1].metadata["audio_file"]
|
||||||
)
|
)
|
||||||
|
|
||||||
assert "answer." == docs[2].content.strip().lower()
|
assert "answer." == docs[2].text.strip().lower()
|
||||||
assert "<<binary stream>>" == docs[2].metadata["audio_file"]
|
assert "<<binary stream>>" == docs[2].metadata["audio_file"]
|
||||||
|
|||||||
@ -22,14 +22,14 @@ def test_whisper_remote_transcriber(preview_samples_path):
|
|||||||
docs = output["documents"]
|
docs = output["documents"]
|
||||||
assert len(docs) == 3
|
assert len(docs) == 3
|
||||||
|
|
||||||
assert "this is the content of the document." == docs[0].content.strip().lower()
|
assert "this is the content of the document." == docs[0].text.strip().lower()
|
||||||
assert preview_samples_path / "audio" / "this is the content of the document.wav" == docs[0].metadata["audio_file"]
|
assert preview_samples_path / "audio" / "this is the content of the document.wav" == docs[0].metadata["audio_file"]
|
||||||
|
|
||||||
assert "the context for this answer is here." == docs[1].content.strip().lower()
|
assert "the context for this answer is here." == docs[1].text.strip().lower()
|
||||||
assert (
|
assert (
|
||||||
str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute())
|
str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute())
|
||||||
== docs[1].metadata["audio_file"]
|
== docs[1].metadata["audio_file"]
|
||||||
)
|
)
|
||||||
|
|
||||||
assert "answer." == docs[2].content.strip().lower()
|
assert "answer." == docs[2].text.strip().lower()
|
||||||
assert "<<binary stream>>" == docs[2].metadata["audio_file"]
|
assert "<<binary stream>>" == docs[2].metadata["audio_file"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user