A test file that reaches `module` both ways an import can name it.
(service: string, module: string)
| 25 | |
| 26 | /** A test file that reaches `module` both ways an import can name it. */ |
| 27 | function tests(service: string, module: string): string { |
| 28 | return `import ${module} |
| 29 | from ${module} import check |
| 30 | |
| 31 | |
| 32 | def test_${service}_attr(): |
| 33 | assert ${module}.check(1) == 1 |
| 34 | |
| 35 | |
| 36 | def 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. */ |
| 42 | function service(name: string, config: Record<string, string>, root = 'code'): Record<string, string> { |
no outgoing calls
no test coverage detected