change the create_stub_module stuff a bit

This commit is contained in:
Dave Halter
2020-10-24 10:19:20 +02:00
parent 6094e7b39a
commit a03a093e2c
5 changed files with 12 additions and 9 deletions

View File

@@ -70,7 +70,7 @@ def test_stub_get_line_code(Script):
script = Script(code)
d, = script.goto(only_stubs=True)
assert d.get_line_code() == 'class ABC(metaclass=ABCMeta): ...\n'
del parser_cache[script._inference_state.latest_grammar._hashed][str(d.module_path)]
del parser_cache[script._inference_state.latest_grammar._hashed][d.module_path]
d, = Script(path=d.module_path).goto(d.line, d.column, only_stubs=True)
assert d.is_stub()
assert d.get_line_code() == 'class ABC(metaclass=ABCMeta): ...\n'