test pytest plugin
Cover validate_text assertions, fixture factories, marker registration, and pytest integration using pytester for subprocess testing.
This commit is contained in:
30
tests/test_pytest_plugin/conftest.py
Normal file
30
tests/test_pytest_plugin/conftest.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Pytest configuration for pytest_plugin tests."""
|
||||
|
||||
import pytest
|
||||
|
||||
from veritext.pytest_plugin.fixtures import ValidatorFactory
|
||||
|
||||
# Enable the pytester fixture for plugin testing
|
||||
pytest_plugins = ["pytester"]
|
||||
|
||||
# Re-export fixtures from the plugin module for testing
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def text_validator() -> ValidatorFactory:
|
||||
return ValidatorFactory()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def validation_context() -> type:
|
||||
from typing import Any
|
||||
|
||||
from veritext.core.types import ValidationContext
|
||||
|
||||
def _create(
|
||||
reference: str | list[str] | None = None,
|
||||
**metadata: Any,
|
||||
) -> ValidationContext:
|
||||
return ValidationContext(reference=reference, metadata=metadata)
|
||||
|
||||
return _create
|
||||
Reference in New Issue
Block a user