1
0
forked from VimPlug/jedi

Remove a lot of test references to Python 2/3.5

This commit is contained in:
Dave Halter
2020-07-02 00:17:21 +02:00
parent 0e5869b52f
commit 50b85153ce
32 changed files with 24 additions and 87 deletions

View File

@@ -272,9 +272,6 @@ dic = {str(key): ''}
#? str()
dic['']
# Just skip Python 2 tests from here. EoL soon, I'm too lazy for it.
# python > 2.7
for x in {1: 3.0, '': 1j}:
#? int() str()
@@ -473,7 +470,6 @@ def test_func():
#? int()
tuple({1})[0]
# python > 2.7
# -----------------
# PEP 3132 Extended Iterable Unpacking (star unpacking)
# -----------------

View File

@@ -5,8 +5,6 @@ Currently we're not supporting completion of them, but they should at least not
raise errors or return extremely strange results.
"""
# python >= 3.5
async def x():
return 1

View File

@@ -344,8 +344,6 @@ def foo(my_t=some_defa
#? ['some_default']
def foo(my_t=some_defa, my_t2=some_defa
# python > 2.7
#? ['my_type']
def foo(my_t: lala=some_defa, my_t2: my_typ
#? ['my_type']

View File

@@ -382,7 +382,6 @@ getattr(getattr, 1)
getattr(str, [])
# python >= 3.5
class Base():
def ret(self, b):
return b

View File

@@ -174,8 +174,6 @@ class X():
#? int()
X([1]).foo()
# set/dict comprehensions were introduced in 2.7, therefore:
# python >= 2.7
# -----------------
# dict comprehensions
# -----------------

View File

@@ -388,7 +388,6 @@ k = 'a'
#? int()
some_dct[k]
# python > 3.5
some_other_dct = dict(some_dct, c=set)
#? int()
some_other_dct['a']

View File

@@ -242,8 +242,6 @@ def x():
# yield from
# -----------------
# python > 2.7
def yield_from():
yield from iter([1])

View File

@@ -97,7 +97,6 @@ def x(): pass
# -----------------
# Only keyword arguments are valid
# -----------------
# python >= 3.5
def x(bam, *, bar, baz):
pass

View File

@@ -1,7 +1,5 @@
""" Pep-0484 type hinting """
# python > 2.7
class A():
pass

View File

@@ -1,7 +1,5 @@
"""
Test the typing library, with docstrings. This is needed since annotations
are not supported in python 2.7 else then annotating by comment (and this is
still TODO at 2016-01-23)
Test the typing library, with docstrings and annotations
"""
import typing
class B:
@@ -295,8 +293,6 @@ y = type(PlainInt)
#? type.mro
y.mro
# python > 2.7
class TestDefaultDict(typing.DefaultDict[str, int]):
def setdud(self):
pass
@@ -323,7 +319,6 @@ for key in x.keys():
for value in x.values():
#? int()
value
# python > 2.7
"""

View File

@@ -178,8 +178,6 @@ from datetime import datetime, timedelta
# magic methods
# -----------------
# python >= 3.5
class C:
def __sub__(self, other) -> int: ...
def __radd__(self, other) -> float: ...

View File

@@ -1,4 +1,3 @@
# python > 2.7
import pytest
from pytest import fixture
@@ -130,8 +129,6 @@ def test_p(monkeypatch):
#? ['setattr']
monkeypatch.setatt
# python > 2.7
#? ['capsysbinary']
def test_p(capsysbin

View File

@@ -362,7 +362,6 @@ class Test(metaclass=Meta):
# Enum
# -----------------
# python > 2.7
import enum
class X(enum.Enum):

View File

@@ -1,4 +1,3 @@
# python > 2.7
from stub_folder import with_stub, stub_only, with_stub_folder, stub_only_folder
# -------------------------

View File

@@ -135,7 +135,6 @@ set_t2.c
# -----------------
# pep 448 unpacking generalizations
# -----------------
# python >= 3.5
d = {'a': 3}
dc = {v: 3 for v in ['a']}

View File

@@ -354,7 +354,6 @@ class DefinitelyNotGlobal:
# stubs
# -----------------
# python > 2.7
from stub_folder import with_stub
#< ('stub:stub_folder.with_stub', 5, 4), ('stub_folder.with_stub', 5, 4), (0, 10)
with_stub.stub_function