Skip to content

MAINT: Add contract tests for the deprecation-shim layer (currently 0% covered) #875

Description

@mmcky

Problem

All 21 base-level deprecation shims (quantecon/arma.pyrobustlq.py) sit at 0% test coverage — nothing asserts that (a) each emits DeprecationWarning on attribute access and (b) every name in each shim's __all__ actually resolves at the top level, which is what the warning text promises. The predictable failure already happened: six advertised names are missing from quantecon (#853ckron, gridmake, annotate_nodes, num_compositions_jit, simulate_linear_model, solve_discrete_riccati_system; independently re-verified during this audit).

This issue is the guard-rail, deliberately scoped apart from the fixes: #853 restores the six exports; #865 decides removal timing. Whichever way #865 concludes, the layer should be honest while it exists.

Proposed change

One parametrized test module (~40 lines): for each shim, import it, assert every __all__ name exists on quantecon, assert getattr emits DeprecationWarning, and assert an unknown attribute raises AttributeError. It lands red on the #853 six until that fix merges — coordinate ordering, or xfail those entries with a link.

Acceptance criteria

If #865 concludes with immediate removal, close this as wontfix with a link.


From the July 2026 technical-debt audit (AI-assisted; claims verified against 28d4b3b on 2026-07-25).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions