forked from VimPlug/jedi
Adjust for change to documention change of next in Python 3.12
The signature of the builtin isn't actually changing in Python 3.12, however its documentation has changed.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from textwrap import dedent
|
||||
import sys
|
||||
import math
|
||||
from collections import Counter
|
||||
from datetime import datetime
|
||||
@@ -26,7 +27,10 @@ def test_builtin_loading(inference_state):
|
||||
assert not from_name.py__doc__() # It's a stub
|
||||
|
||||
|
||||
def test_next_docstr(inference_state):
|
||||
def test_next_docstr(inference_state, environment):
|
||||
if environment.version_info[:2] != sys.version_info[:2]:
|
||||
pytest.skip()
|
||||
|
||||
next_ = compiled.builtin_from_name(inference_state, 'next')
|
||||
assert next_.tree_node is not None
|
||||
assert next_.py__doc__() == '' # It's a stub
|
||||
|
||||
@@ -13,7 +13,8 @@ from ..helpers import get_example_dir
|
||||
'code, sig, names, op, version', [
|
||||
('import math; math.cos', 'cos(x, /)', ['x'], ge, (3, 6)),
|
||||
|
||||
('next', 'next(iterator, default=None, /)', ['iterator', 'default'], ge, (3, 6)),
|
||||
('next', 'next(iterator, default=None, /)', ['iterator', 'default'], lt, (3, 12)),
|
||||
('next', 'next()', [], ge, (3, 12)),
|
||||
|
||||
('str', "str(object='', /) -> str", ['object'], ge, (3, 6)),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user