forked from VimPlug/jedi
Remove a lot of test references to Python 2/3.5
This commit is contained in:
@@ -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)
|
||||
# -----------------
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -382,7 +382,6 @@ getattr(getattr, 1)
|
||||
getattr(str, [])
|
||||
|
||||
|
||||
# python >= 3.5
|
||||
class Base():
|
||||
def ret(self, b):
|
||||
return b
|
||||
|
||||
@@ -174,8 +174,6 @@ class X():
|
||||
#? int()
|
||||
X([1]).foo()
|
||||
|
||||
# set/dict comprehensions were introduced in 2.7, therefore:
|
||||
# python >= 2.7
|
||||
# -----------------
|
||||
# dict comprehensions
|
||||
# -----------------
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -242,8 +242,6 @@ def x():
|
||||
# yield from
|
||||
# -----------------
|
||||
|
||||
# python > 2.7
|
||||
|
||||
def yield_from():
|
||||
yield from iter([1])
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ def x(): pass
|
||||
# -----------------
|
||||
# Only keyword arguments are valid
|
||||
# -----------------
|
||||
# python >= 3.5
|
||||
|
||||
def x(bam, *, bar, baz):
|
||||
pass
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
""" Pep-0484 type hinting """
|
||||
|
||||
# python > 2.7
|
||||
|
||||
|
||||
class A():
|
||||
pass
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
"""
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -362,7 +362,6 @@ class Test(metaclass=Meta):
|
||||
# Enum
|
||||
# -----------------
|
||||
|
||||
# python > 2.7
|
||||
import enum
|
||||
|
||||
class X(enum.Enum):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# python > 2.7
|
||||
from stub_folder import with_stub, stub_only, with_stub_folder, stub_only_folder
|
||||
|
||||
# -------------------------
|
||||
|
||||
@@ -135,7 +135,6 @@ set_t2.c
|
||||
# -----------------
|
||||
# pep 448 unpacking generalizations
|
||||
# -----------------
|
||||
# python >= 3.5
|
||||
|
||||
d = {'a': 3}
|
||||
dc = {v: 3 for v in ['a']}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user