docstr: Test if the component runs correctly if the input is a mix of strings, paths and ByteStreams.
docstr_tok: ["Test","if","the","component","runs","correctly","if","the","input","is","a","mix","of","strings",",","paths","and","ByteStreams","."]
code: def test_mixed_sources_run(self, test_files_path):
      """
      Test if the component runs correctly if the input is a mix of strings, paths and ByteStreams.
      """
      sources = [
          test_files_path / "markdown" / "sample.md",
          str((test_files_path / "markdown" / "sample.md").absolute()),
      ]
      with open(test_files_path / "markdown" / "sample.md", "rb") as f:
          byte_stream = f.read()
          sources.append(ByteStream(byte_stream))
  
      converter = MarkdownToDocument()
      output = converter.run(sources=sources)
      docs = output["documents"]
      assert len(docs) == 3
      for doc in docs:
          assert "What to build with Haystack" in doc.content
          assert (
              "# git clone https://github.com/deepset-ai/haystack.git"
              in doc.content
          )
  
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 8 for calling the TestMarkdownToDocument obj's underlying member method code with example usage: obj.test_mixed_sources_run(test_files_path) without return types