From 01b1fd849d2e7b1621320846ca42719cf25431c4 Mon Sep 17 00:00:00 2001 From: cybermaggedon Date: Fri, 15 May 2026 12:58:12 +0100 Subject: [PATCH] Optional test warning suppression (#923) * Fix test collection module errors & silence upstream Pytest warnings (#823) * chore: add virtual environment and .env directories to gitignore * test: filter upstream DeprecationWarning and UserWarning messages * fix(namespace): remove empty __init__.py files to fix PEP 420 implicit namespace routing for trustgraph sub-packages * Revert __init__.py deletions * Add .ini changes but commented out, will be useful at times --------- Co-authored-by: Salil M --- .gitignore | 5 ++++- tests/pytest.ini | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 32942156..366edb4a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,7 @@ trustgraph-vertexai/trustgraph/vertexai_version.py trustgraph-unstructured/trustgraph/unstructured_version.py trustgraph-mcp/trustgraph/mcp_version.py trustgraph/trustgraph/trustgraph_version.py -vertexai/ \ No newline at end of file +vertexai/ +venv/ +.venv/ +.env diff --git a/tests/pytest.ini b/tests/pytest.ini index 5dcc095c..a89759ab 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -16,4 +16,13 @@ markers = unit: marks tests as unit tests contract: marks tests as contract tests (service interface validation) vertexai: marks tests as vertex ai specific tests - asyncio: marks tests that use asyncio \ No newline at end of file + asyncio: marks tests that use asyncio +# This is helpful if you're bored with deprecationwarnings. I prefer to +# keep the warnings for now, it avoids masking problems. +# +# filterwarnings = +# ignore:Core Pydantic V1 functionality isn't compatible with Python 3.14.*:UserWarning +# ignore:builtin type SwigPyPacked has no __module__ attribute:DeprecationWarning +# ignore:builtin type SwigPyObject has no __module__ attribute:DeprecationWarning +# ignore:builtin type swigvarlink has no __module__ attribute:DeprecationWarning +# ignore:.*_UnionGenericAlias.*is deprecated and slated for removal in Python 3.17:DeprecationWarning