Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Prev Previous commit
Next Next commit
Fixed bugs after refoactorig tests
  • Loading branch information
ilevkivskyi committed Sep 9, 2016
commit 3c0810726b3d369ccc555d7c4834c45857d2a8d3
10 changes: 5 additions & 5 deletions src/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,8 @@ def __anext__(self) -> T_a:
class B:
x: ClassVar[Optional['B']] = None
y: int
class C(B):
z: ClassVar['C'] = B()
class CSub(B):
z: ClassVar['CSub'] = B()
class G(Generic[T]):
lst: ClassVar[List[T]] = []
"""
Expand Down Expand Up @@ -1211,10 +1211,10 @@ def testf(x, y): ...

@skipUnless(PY36, 'Python 3.6 required')
def test_get_type_hints_ClassVar(self):
self.assertEqual(gth(B, locals()),
self.assertEqual(gth(B, globals()),
ChainMap({'y': int, 'x': ClassVar[Optional[B]]}, {}))
self.assertEqual(gth(C, locals()),
ChainMap({'z': ClassVar[C]},
self.assertEqual(gth(CSub, globals()),
ChainMap({'z': ClassVar[CSub]},
{'y': int, 'x': ClassVar[Optional[B]]}, {}))
self.assertEqual(gth(G), ChainMap({'lst': ClassVar[List[T]]},{},{}))

Expand Down