def test_withStatementUndefinedInExpression():
    flakes('''
    from __future__ import with_statement
    with bar as baz:
        pass
    ''', m.UndefinedName)

    flakes('''
    from __future__ import with_statement
    with bar as bar:
        pass
    ''', m.UndefinedName)
An undefined name warning is emitted if a name in the I{test} expression of a  statement is undefined.
dataset/ETHPy150Open timothycrosley/frosted/frosted/test/test_other.py/test_withStatementUndefinedInExpression