(svc: string, fn = 'go')
| 399 | const FOO = 'class Foo:\n def m(self):\n return 1\n'; |
| 400 | const OTHER = 'class Other:\n def m(self):\n return 2\n'; |
| 401 | const resolves = async (svc: string, fn = 'go') => { |
| 402 | write('foo.py', FOO); |
| 403 | write('other.py', OTHER); |
| 404 | write('svc.py', svc); |
| 405 | cg = await CodeGraph.init(tempDir, { index: true }); |
| 406 | return callsFrom('method', fn).filter((c) => c.startsWith('method:m@')); |
| 407 | }; |
| 408 | |
| 409 | it('a keyword argument passing a parameter through is not a rebinding', async () => { |
| 410 | expect(await resolves('from foo import Foo\n\nclass Base:\n def __init__(self, client=None):\n pass\n\nclass Svc(Base):\n def __init__(self, client: Foo):\n super().__init__(\n client=client,\n )\n validate(client=client)\n self.client = client\n\n def go(self):\n return self.client.m()\n\ndef validate(client=None):\n return client\n')) |
no test coverage detected