Files
codebase-memory-mcp/tests
Martin Vogel 74b115e929 test(python): a top-level __go(locals()) keeps the package namespace
sqlalchemy's sql/__init__.py ends with __go(locals()). The callee is a same-module function that never touches its parameter or the module's globals; only the submodules its body imports become package attributes. The extraction test pins the exact shape (the namespace survives, the imported submodules are shadowed at the call) and its controls: the body uses the parameter, global (also nested), globals(), sys.modules[__name__], the own package name, a same-module helper; an imported, rebound or not yet defined callee; an argument with an effect; a module-level locals. The pipeline fixture adds the same shape end to end, with a re-export the body's submodule import replaces and a __go that writes its parameter.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-19 05:55:21 +02:00
..
2026-10-11 16:57:48 +02:00