summaryrefslogtreecommitdiff
path: root/tests/functional/w/with_used_before_assign.py
blob: ebe7d3093c6e87e02007ea87e6cd57311ce7055e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"""
Regression test for
https://bitbucket.org/logilab/pylint/issue/128/attributeerror-when-parsing
"""
from __future__ import with_statement


def do_nothing():
    """ empty """
    with open("", encoding="utf-8") as ctx.obj:  # [undefined-variable]
        context.do()  # [used-before-assignment]
        context = None