GitNexus/gitnexus/test/fixtures/lang-resolution/python-module-import/app.py
Gergo Magyar bbd95457df test(python): strengthen module-import tests, un-skip match/case, add perf guard
- Rewrite Issue #337 test suite: 5 tests → 19 tests with exact node/edge
  counts, sourceFilePath guards, negative tests, method call disambiguation
  (u.save(), a.login(), v.verify()), HAS_METHOD verification, and
  cross-module collision assertions
- Un-skip 2 match/case as-pattern tests (they pass now) and remove leftover
  DEBUG test
- Add per-chunk language guard for synthesizeWildcardImportBindings — skips
  full graph traversal for TS/JS-only chunks, avoiding O(chunks × graph_size)
- Rename fixture method check → verify to avoid BUILT_IN_NAMES noise filter
- Expand fixture with method calls on constructor-inferred receivers
- Fix stale comment referencing only "Go package imports"
2026-03-23 08:25:46 +00:00

14 lines
311 B
Python

import models
import auth
u = models.User()
u.save()
a = auth.Admin()
a.login()
# Same-name cross-module disambiguation: both models and auth export User.
# moduleAliasMap maps receiverName='auth' → auth.py, enabling resolveCallTarget
# to narrow candidates to the correct file.
v = auth.User()
v.verify()