mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Add a typeshed test
This commit is contained in:
14
test/test_evaluate/test_gradual/test_typeshed.py
Normal file
14
test/test_evaluate/test_gradual/test_typeshed.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize('code', ('import math', 'from math import cos'))
|
||||
def test_math_is_stub(Script, code):
|
||||
s = Script(code)
|
||||
cos, = s.goto_definitions()
|
||||
wanted = os.path.join('typeshed', 'stdlib', '2and3', 'math.pyi')
|
||||
assert cos.module_path.endswith(wanted)
|
||||
|
||||
cos, = s.goto_assignments()
|
||||
assert cos.module_path.endswith(wanted)
|
||||
Reference in New Issue
Block a user