provide-testkit 2025-12-31
Configure structlog for test-safe defaults in early init and pytest plugin
8 files · 133+ · 17-

Structlog test-safe configuration

2 files changed
  • _early_init.py Added _configure_structlog_for_testing() that sets up BoundLogger wrapper, strips Foundation context keys, disables caching, and runs unconditionally during .pth init
  • pytest_plugin.py Added top-level structlog.configure() with same test-safe defaults before Foundation imports, ensuring proper logger configuration even during circular import resolution
  • Configured structlog with BoundLogger wrapper and context-stripping processor before Foundation imports to prevent fallback loggers from using BoundLoggerFilteringAtNotset harden architectural
    2 files
    • _early_init.py
    • pytest_plugin.py

Minor code cleanup

2 files changed
  • script_fixtures.py Added nosec B604 comment for trusted shell=True in test helper
  • fixture.py Reformatted long function signature
  • Added security suppression comment for intentional shell=True usage in test script execution helper remediate internal
    1 file
    • script_fixtures.py