summaryrefslogtreecommitdiff
path: root/pylint/test/functional/with_using_generator.py
blob: 25c6b3776702546dbbfc8576ff089f1de4acf3da (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(object):
    """ 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