Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich committed Apr 14, 2024
2 parents 399c94a + f679e1c commit dee309d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import os

import pytest
from fsspec.implementations.local import LocalFileSystem

from llama_parse import LlamaParse


@pytest.mark.skipif(
os.environ.get("LLAMA_CLOUD_API_KEY", "") == "",
reason="LLAMA_CLOUD_API_KEY not set",
)
def test_simple_page_text() -> None:
parser = LlamaParse(result_type="text")

Expand All @@ -16,6 +20,10 @@ def test_simple_page_text() -> None:
assert len(result[0].text) > 0


@pytest.mark.skipif(
os.environ.get("LLAMA_CLOUD_API_KEY", "") == "",
reason="LLAMA_CLOUD_API_KEY not set",
)
def test_simple_page_markdown() -> None:
parser = LlamaParse(result_type="markdown")

Expand All @@ -27,6 +35,10 @@ def test_simple_page_markdown() -> None:
assert len(result[0].text) > 0


@pytest.mark.skipif(
os.environ.get("LLAMA_CLOUD_API_KEY", "") == "",
reason="LLAMA_CLOUD_API_KEY not set",
)
def test_simple_page_with_custom_fs() -> None:
parser = LlamaParse(result_type="markdown")
fs = LocalFileSystem()
Expand All @@ -37,6 +49,10 @@ def test_simple_page_with_custom_fs() -> None:
assert len(result) == 1


@pytest.mark.skipif(
os.environ.get("LLAMA_CLOUD_API_KEY", "") == "",
reason="LLAMA_CLOUD_API_KEY not set",
)
def test_simple_page_progress_workers() -> None:
parser = LlamaParse(result_type="markdown", show_progress=True, verbose=True)

Expand Down

0 comments on commit dee309d

Please sign in to comment.