Skip to content

feat(testing): docstring-vs-code consistency test #424

@bokelley

Description

@bokelley

Context

client.py:381-388 claimed PYTHON_ENV / ENV / ENVIRONMENT env vars were honored; only ADCP_ENV was. Docstring was stale for months.

Add a test that AST-parses public method docstrings, looks for env-var references, then greps the code for matching os.environ.get(...) calls. Drift = test failure.

Acceptance Criteria

  • New tests/test_docstring_consistency.py
  • AST-parses public method docstrings in src/adcp/
  • Extracts env-var references and verifies a matching os.environ.get(...) call exists
  • CI fails on drift

Files

  • src/adcp/client.py:381-388 (the original drift)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions