9f97f3abbe
CI - Node Bindings / Build darwin-arm64 (push) Waiting to run
CI - Node Bindings / Build darwin-x64 (push) Waiting to run
CI - Node Bindings / Test win32-x64-msvc (push) Blocked by required conditions
CI - Node Bindings / Build linux-arm64-gnu (push) Waiting to run
CI - Node Bindings / Build linux-x64-gnu (push) Waiting to run
CI - Node Bindings / Build linux-x64-musl (push) Waiting to run
CI - Node Bindings / Build win32-arm64-msvc (push) Waiting to run
CI - Node Bindings / Build win32-x64-msvc (push) Waiting to run
CI - Node Bindings / Test darwin-arm64 (push) Blocked by required conditions
CI - Node Bindings / Test darwin-x64 (push) Blocked by required conditions
CI - Node Bindings / Test linux-x64-gnu (push) Blocked by required conditions
CI - Node Bindings / Test linux-x64-musl (push) Blocked by required conditions
CI - Node Bindings / Test win32-arm64-msvc (push) Blocked by required conditions
CI - Python Bindings / Build aarch64-pc-windows-msvc (push) Waiting to run
CI - Python Bindings / Build x86_64-pc-windows-msvc (push) Waiting to run
CI - Python Bindings / Build x86_64-apple-darwin (push) Waiting to run
CI - Python Bindings / Build aarch64-apple-darwin (push) Waiting to run
CI - Python Bindings / Build aarch64-unknown-linux-gnu (push) Waiting to run
CI - Python Bindings / Test x86_64-apple-darwin (push) Blocked by required conditions
CI - Python Bindings / Test aarch64-apple-darwin (push) Blocked by required conditions
CI - Python Bindings / Test x86_64-unknown-linux-gnu (push) Blocked by required conditions
CI - Python Bindings / Test x86_64-unknown-linux-musl (push) Blocked by required conditions
CI - Python Bindings / Test aarch64-pc-windows-msvc (push) Blocked by required conditions
CI - Python Bindings / Test x86_64-pc-windows-msvc (push) Blocked by required conditions
CI / build-and-test (macos-26-intel) (push) Waiting to run
CI / build-and-test (macos-latest) (push) Waiting to run
CI / build-and-test (windows-11-arm) (push) Waiting to run
CI / build-and-test (windows-latest) (push) Waiting to run
CI - Python Bindings / sdist (push) Failing after 1s
CI - Python Bindings / Build x86_64-unknown-linux-musl (push) Failing after 1s
CI / fmt (push) Failing after 1s
E2E Output Validation / compare-outputs (push) Failing after 1s
Sync Docs to Developer Hub / sync-docs (push) Failing after 1s
CI - Python Bindings / Build x86_64-unknown-linux-gnu (push) Failing after 1s
CI - WASM Bindings / Build WASM (push) Failing after 0s
CI / clippy (push) Failing after 1s
CI / build-and-test (ubuntu-latest) (push) Failing after 0s
CI - WASM Bindings / Edge runtime PDF parse test (push) Has been skipped
CI - WASM Bindings / Browser PDF parse test (push) Has been skipped
E2E Output Validation / upload-dataset (push) Waiting to run
Deploy Demo to GitHub Pages / deploy (push) Failing after 1s
CI / build-docker-image (push) Failing after 3s
46 lines
1.0 KiB
Python
46 lines
1.0 KiB
Python
"""Shared fixtures for e2e tests."""
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from liteparse import LiteParse
|
|
|
|
# Resolve test-docs relative to the repo root
|
|
REPO_ROOT = Path(__file__).resolve().parents[3]
|
|
TEST_DOCS = REPO_ROOT / "test-docs"
|
|
EXPECTED_DATASET = REPO_ROOT / "expected-dataset" / "data"
|
|
|
|
|
|
@pytest.fixture
|
|
def parser() -> LiteParse:
|
|
"""LiteParse instance (auto-detects CLI)."""
|
|
return LiteParse()
|
|
|
|
|
|
@pytest.fixture
|
|
def invoice_pdf() -> Path:
|
|
"""Path to a small single-page invoice PDF."""
|
|
p = TEST_DOCS / "invoice.pdf"
|
|
if not p.exists():
|
|
pytest.skip(f"Test document not found: {p}")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def two_page_pdf() -> Path:
|
|
"""Path to a 2-page PDF."""
|
|
p = EXPECTED_DATASET / "2pages.pdf"
|
|
if not p.exists():
|
|
pytest.skip(f"Test document not found: {p}")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def empty_pdf() -> Path:
|
|
"""Path to an empty PDF."""
|
|
p = EXPECTED_DATASET / "empty.pdf"
|
|
if not p.exists():
|
|
pytest.skip(f"Test document not found: {p}")
|
|
return p
|