Skip to content

Commit 623e921

Browse files
committed
Add Python 2 test case
1 parent 8f094bb commit 623e921

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

mypy/test/data/python2eval.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,19 @@ _program.py:2: error: No overload variant of "f" matches argument types [builtin
379379
def f(x): # type: (str) -> None
380380
pass
381381
f(bytearray('foo'))
382+
383+
[case testAbstractProperty_python2]
384+
from abc import abstractproperty, ABCMeta
385+
class A:
386+
__metaclass__ = ABCMeta
387+
@abstractproperty
388+
def x(self): # type: () -> int
389+
pass
390+
class B(A):
391+
@property
392+
def x(self): # type: () -> int
393+
return 3
394+
b = B()
395+
print b.x + 1
396+
[out]
397+
4

0 commit comments

Comments
 (0)