Skip to content

Python scraper based on AI

1.6 KB
Raw Blame
[pytest]
# Pytest configuration for ScrapeGraphAI

# Test discovery patterns
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*

# Test paths
testpaths = tests

# Minimum Python version
minversion = 8.0

# Output options
addopts =
    # Verbosity
    -v
    --tb=short
    --strict-markers

    # Coverage options
    --cov=scrapegraphai
    --cov-report=term-missing
    --cov-report=html:htmlcov
    --cov-report=xml
    --cov-branch

    # Performance
    --durations=10

    # Warnings
    -W default
    --strict-config

    # Output
    --color=yes

# Markers
markers =
    integration: Integration tests requiring network access
    slow: Slow-running tests
    llm_provider: Tests for specific LLM providers
    requires_api_key: Tests requiring API keys
    benchmark: Performance benchmark tests
    unit: Unit tests (fast, no external dependencies)
    e2e: End-to-end tests

# Test collection
norecursedirs =
    .git
    .tox
    dist
    build
    *.egg
    .venv
    venv
    __pycache__
    .pytest_cache
    .ruff_cache
    node_modules

# Timeout for tests (in seconds)
timeout = 300

# Async test configuration
asyncio_mode = auto

# Coverage options
[coverage:run]
source = scrapegraphai
omit =
    */tests/*
    */test_*.py
    */__pycache__/*
    */site-packages/*
    .venv/*

[coverage:report]
exclude_lines =
    pragma: no cover
    def __repr__
    raise AssertionError
    raise NotImplementedError
    if __name__ == .__main__.:
    if TYPE_CHECKING:
    @abstractmethod
    @abstract

precision = 2
show_missing = True

[coverage:html]
directory = htmlcov