MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_multi_alias

Function test_multi_alias

tests/test_elixir_qualified_calls.py:106–123  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

104
105
106def test_multi_alias(tmp_path: Path):
107 calls = _calls(tmp_path, {
108 "lib/app/accounts.ex": _ACCOUNTS,
109 "lib/app/repo.ex": _REPO,
110 "lib/app/web.ex": _module("App.Web", (
111 " alias App.{Accounts, Repo}\n"
112 "\n"
113 " def show(id) do\n"
114 " Accounts.get_user(id)\n"
115 " end\n"
116 "\n"
117 " def save(x) do\n"
118 " Repo.insert(x)\n"
119 " end\n"
120 )),
121 })
122 assert calls.get(("App.Web.show", "App.Accounts.get_user")) == "EXTRACTED"
123 assert calls.get(("App.Web.save", "App.Repo.insert")) == "EXTRACTED"
124
125
126def test_dunder_module(tmp_path: Path):

Callers

nothing calls this directly

Calls 3

_callsFunction · 0.70
_moduleFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected