mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
Fix tests in Python 2
This commit is contained in:
@@ -169,6 +169,8 @@ from datetime import datetime, timedelta
|
|||||||
# magic methods
|
# magic methods
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
|
# python >= 3.5
|
||||||
|
|
||||||
class C:
|
class C:
|
||||||
def __sub__(self, other) -> int: ...
|
def __sub__(self, other) -> int: ...
|
||||||
def __radd__(self, other) -> float: ...
|
def __radd__(self, other) -> float: ...
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import pytest
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL")
|
@pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL")
|
||||||
def test_issue436(Script):
|
def test_issue436(Script, skip_python2):
|
||||||
code = "bar = 0\nbar += 'foo' + 4"
|
code = "bar = 0\nbar += 'foo' + 4"
|
||||||
errors = set(repr(e) for e in Script(code)._analysis())
|
errors = set(repr(e) for e in Script(code)._analysis())
|
||||||
assert len(errors) == 2
|
assert len(errors) == 2
|
||||||
|
|||||||
Reference in New Issue
Block a user