From da7596ce20776dc11a6cf302e685cbbb837e7efb Mon Sep 17 00:00:00 2001 From: Beon de Nood Date: Sun, 18 Jan 2026 05:45:29 -0500 Subject: [PATCH 1/2] fix: resolve pytest warnings for deprecation and unknown marks 1. Register 'integration' and 'slow' custom pytest markers in pyproject.toml 2. Import AvailabilityScorer from legacy module directly to avoid deprecation warning (we only use score_not_tested() method) 3. Remove unused TrustScorer import from message validator This eliminates pytest warnings in CI runs. --- capiscio_sdk/validators/message.py | 7 ++++--- pyproject.toml | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/capiscio_sdk/validators/message.py b/capiscio_sdk/validators/message.py index e9a6757..554ee72 100644 --- a/capiscio_sdk/validators/message.py +++ b/capiscio_sdk/validators/message.py @@ -1,7 +1,8 @@ """Message validation logic.""" from typing import TYPE_CHECKING, Any, Dict, List from ..types import ValidationResult, ValidationIssue, ValidationSeverity -from ..scoring import TrustScorer, AvailabilityScorer +# Import legacy scorer directly to avoid deprecation warning (we only use score_not_tested) +from ..scoring.availability import AvailabilityScorer as _LegacyAvailabilityScorer if TYPE_CHECKING: from ..scoring.types import ComplianceScore @@ -19,8 +20,8 @@ class MessageValidator: def __init__(self) -> None: """Initialize message validator.""" self._url_validator = URLSecurityValidator() - self._trust_scorer = TrustScorer() - self._availability_scorer = AvailabilityScorer() + # Use legacy scorer directly (not the deprecated wrapper) for score_not_tested() + self._availability_scorer = _LegacyAvailabilityScorer() def validate(self, message: Dict[str, Any], skip_signature_verification: bool = True) -> ValidationResult: """ diff --git a/pyproject.toml b/pyproject.toml index 7386c3c..bfda63f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,10 @@ testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] +markers = [ + "integration: marks tests as integration tests (require external services)", + "slow: marks tests as slow (deselect with '-m "not slow"')", +] [tool.coverage.run] source = ["capiscio_sdk"] From bdd434966c5bb47e68b6ce5f6feff1566e824583 Mon Sep 17 00:00:00 2001 From: Beon de Nood Date: Sun, 18 Jan 2026 05:48:00 -0500 Subject: [PATCH 2/2] fix: escape nested quotes in TOML markers config --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bfda63f..66a9c7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ python_classes = ["Test*"] python_functions = ["test_*"] markers = [ "integration: marks tests as integration tests (require external services)", - "slow: marks tests as slow (deselect with '-m "not slow"')", + "slow: marks tests as slow (deselect with '-m not slow')", ] [tool.coverage.run]