mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-07-07 20:27:49 +02:00
fix(warnings):
This commit is contained in:
+16
-1
@@ -1,10 +1,25 @@
|
||||
import os
|
||||
import warnings
|
||||
|
||||
import pytest
|
||||
from cache_to_disk import delete_old_disk_caches
|
||||
|
||||
from sklearn.exceptions import InconsistentVersionWarning
|
||||
from agentic_security.logutils import logger
|
||||
|
||||
# Silence noisy third-party warnings that do not impact test behavior
|
||||
warnings.filterwarnings("ignore", category=InconsistentVersionWarning)
|
||||
try:
|
||||
from langchain_core._api import LangChainDeprecationWarning
|
||||
|
||||
warnings.filterwarnings("ignore", category=LangChainDeprecationWarning)
|
||||
except Exception: # pragma: no cover - fallback for older langchain versions
|
||||
warnings.filterwarnings(
|
||||
"ignore",
|
||||
category=DeprecationWarning,
|
||||
module=r"langchain\\.agents",
|
||||
message=r".*langchain_core.pydantic_v1.*",
|
||||
)
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
if "slow" in item.keywords and not os.getenv("RUN_SLOW_TESTS"):
|
||||
|
||||
Reference in New Issue
Block a user