trustgraph/tests
Cyber MacGeddon 33c4b05756 Fix test suite Prometheus registry pollution and remove default
coverage

The test_metrics.py fixture (added in 4e63dbda) deleted
class-level metric singleton attributes without restoring them. This
stripped the hasattr() guards that prevent duplicate Prometheus
registration, so every subsequent Processor construction in the test
run raised ValueError: Duplicated timeseries. Fix by saving and
restoring the original attributes around each test.

Remove --cov=trustgraph from pytest.ini defaults — the coverage
import hooks interact badly with the trustgraph namespace package,
causing duplicate class loading. Coverage can still be requested
explicitly via the command line.

Also fix missing newline at end of test_subscriber_graceful_shutdown.py.
2026-04-14 11:04:55 +01:00
..
contract Add agent explainability instrumentation and unify envelope field naming (#795) 2026-04-13 16:16:42 +01:00
integration Add agent explainability instrumentation and unify envelope field naming (#795) 2026-04-13 16:16:42 +01:00
unit Fix test suite Prometheus registry pollution and remove default 2026-04-14 11:04:55 +01:00
utils Add agent explainability instrumentation and unify envelope field naming (#795) 2026-04-13 16:16:42 +01:00
__init__.py Test suite executed from CI pipeline (#433) 2025-07-14 14:57:44 +01:00
conftest.py Fix test async warnings (#601) 2026-01-06 22:09:34 +00:00
pytest.ini Fix test suite Prometheus registry pollution and remove default 2026-04-14 11:04:55 +01:00
requirements.txt Test suite executed from CI pipeline (#433) 2025-07-14 14:57:44 +01:00