blob: 9f557363fe3949ba3e4abf6b0f5a59543d1170a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
""" Testing with statements that use generators. This should not crash. """
class Base:
""" Base class. """
val = 0
def gen(self):
""" A generator. """
yield self.val
def fun(self):
""" With statement using a generator. """
with self.gen(): # [not-context-manager]
pass
|