diff options
Diffstat (limited to 'pylint/test/functional/with_used_before_assign.py')
-rw-r--r-- | pylint/test/functional/with_used_before_assign.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pylint/test/functional/with_used_before_assign.py b/pylint/test/functional/with_used_before_assign.py new file mode 100644 index 0000000..64a475a --- /dev/null +++ b/pylint/test/functional/with_used_before_assign.py @@ -0,0 +1,11 @@ +''' +Regression test for +https://bitbucket.org/logilab/pylint/issue/128/attributeerror-when-parsing +''' +from __future__ import with_statement + +def do_nothing(): + """ empty """ + with open("") as ctx.obj: # [undefined-variable] + context.do() # [used-before-assignment] + context = None |