MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / tests

Function tests

__tests__/python-declared-import-roots.test.ts:27–39  ·  view source on GitHub ↗

A test file that reaches `module` both ways an import can name it.

(service: string, module: string)

Source from the content-addressed store, hash-verified

25
26/** A test file that reaches `module` both ways an import can name it. */
27function tests(service: string, module: string): string {
28 return `import ${module}
29from ${module} import check
30
31
32def test_${service}_attr():
33 assert ${module}.check(1) == 1
34
35
36def test_${service}_name():
37 assert check(1) == 1
38`;
39}
40
41/** A folder `name` with `code/mod_<name>.py`, tests that import it, and the config files given. */
42function service(name: string, config: Record<string, string>, root = 'code'): Record<string, string> {

Callers 2

serviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected