docstr: Test if the component runs correctly when an input file is not of the expected type.
docstr_tok: ["Test","if","the","component","runs","correctly","when","an","input","file","is","not","of","the","expected","type","."]
code: def test_run_wrong_file_type(self, test_files_path, caplog):
      """
      Test if the component runs correctly when an input file is not of the expected type.
      """
      sources = [test_files_path / "audio" / "answer.wav"]
      converter = MarkdownToDocument()
      with caplog.at_level(logging.WARNING):
          output = converter.run(sources=sources)
          assert "codec can't decode byte" in caplog.text
  
      docs = output["documents"]
      assert not docs
  
file_path: haystack/test/components/converters/test_markdown_to_document.py
imports: import logging
  from unittest.mock import patch
  import pytest
  from haystack.components.converters.markdown import MarkdownToDocument
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 6 for calling the TestMarkdownToDocument obj's underlying member method code with example usage: obj.test_run_wrong_file_type(test_files_path, caplog) without return types