
    j[                     X    S SK r S SKJrJr  S SKJrJr   " S S\5      r " S S\5      r	g)    N)messageschecker)TestCaseskipc                      \ rS rSrS rS rS rS rS r\	" S5      S 5       r
S	 rS
 rS rS r\	" S5      S 5       r\	" S5      S 5       rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!\	" S 5      S! 5       r"S" r#S# r$S$ r%S% r&S& r'S' r(S( r)S) r*S* r+S+ r,S, r-S- r.S. r/S/ r0S0 r1S1 r2S2 r3S3 r4S4 r5S5 r6S6 r7S7 r8S8 r9S9 r:S: r;S; r<S< r=S= r>S> r?S? r@S@ rASA rBSB rCSC rDSD rESE rFSFrGgG)HTest   c                 D    U R                  S[        R                  5        g )NbarflakesmUndefinedNameselfs    Z/var/www/html/KUNJ/venv/lib/python3.13/site-packages/pyflakes/test/test_undefined_names.pytest_undefinedTest.test_undefined   s    E1??+    c                 &    U R                  S5        g )Nz[a for a in range(10) if a]r   r   s    r   test_definedInListCompTest.test_definedInListComp   s    12r   c                 D    U R                  S[        R                  5        g )Nz2
        [a for a in range(10)]
        a
        r   r   s    r   test_undefinedInListCompTest.test_undefinedInListComp   s      OO		%r   c                 b    U R                  S[        R                  [        R                  5        g)zpException names can't be used after the except: block.

The exc variable is unused inside the exception handler.zx
        try:
            raise ValueError('ve')
        except ValueError as exc:
            pass
        exc
        Nr   r   r   UnusedVariabler   s    r   test_undefinedExceptionName Test.test_undefinedExceptionName   s&     	  __a..	0r   c                 &    U R                  S5        g)zLocals declared in except: blocks can be used after the block.

This shows the example in test_undefinedExceptionName is
different.zy
        try:
            raise ValueError('ve')
        except ValueError as exc:
            e = exc
        e
        Nr   r   s    r    test_namesDeclaredInExceptBlocks%Test.test_namesDeclaredInExceptBlocks!       
 	  	r   z5error reporting disabled due to false positives belowc                 D    U R                  S[        R                  5        g)zException names obscure locals, can't be used after.

Last line will raise UnboundLocalError on Python 3 after exiting
the except: block. Note next two examples for false positives to
watch out for.z
        exc = 'Original value'
        try:
            raise ValueError('ve')
        except ValueError as exc:
            pass
        exc
        Nr   r   s    r   1test_undefinedExceptionNameObscuringLocalVariable6Test.test_undefinedExceptionNameObscuringLocalVariable.   s     	  OO	%r   c                 b    U R                  S[        R                  [        R                  5        g)zException names are unbound after the `except:` block.

Last line will raise UnboundLocalError.
The exc variable is unused inside the exception handler.
z
        try:
            raise ValueError('ve')
        except ValueError as exc:
            pass
        print(exc)
        exc = 'Original value'
        Nr   r   s    r   2test_undefinedExceptionNameObscuringLocalVariable27Test.test_undefinedExceptionNameObscuringLocalVariable2?   s&     	  __a..	0r   c                 D    U R                  S[        R                  5        g)zException names obscure locals, can't be used after. Unless.

Last line will never raise UnboundLocalError because it's only
entered if no exception was raised.z
        exc = 'Original value'
        try:
            raise ValueError('ve')
        except ValueError as exc:
            print('exception logged')
            raise
        exc
        Nr   r   r   r   s    r   ?test_undefinedExceptionNameObscuringLocalVariableFalsePositive1DTest.test_undefinedExceptionNameObscuringLocalVariableFalsePositive1N        
 	  	r   c                 &    U R                  S5        g)z7The exception name can be deleted in the except: block.z\
        try:
            pass
        except Exception as exc:
            del exc
        Nr   r   s    r   test_delExceptionInExceptTest.test_delExceptionInExcept]         	r   c                 D    U R                  S[        R                  5        g)zException names obscure locals, can't be used after. Unless.

Last line will never raise UnboundLocalError because `error` is
only falsy if the `except:` block has not been entered.z
        exc = 'Original value'
        error = None
        try:
            raise ValueError('ve')
        except ValueError as exc:
            error = 'exception logged'
        if error:
            print(error)
        else:
            exc
        Nr-   r   s    r   ?test_undefinedExceptionNameObscuringLocalVariableFalsePositive2DTest.test_undefinedExceptionNameObscuringLocalVariableFalsePositive2f   s     
 	  	r   c                 D    U R                  S[        R                  5        g)zException names obscure globals, can't be used after.

Last line will raise UnboundLocalError because the existence of that
exception name creates a local scope placeholder for it, obscuring any
globals, etc.z
        exc = 'Original value'
        def func():
            try:
                pass  # nothing is raised
            except ValueError as exc:
                pass  # block never entered, exc stays unbound
            exc
        Nr   r   UndefinedLocalr   s    r   2test_undefinedExceptionNameObscuringGlobalVariable7Test.test_undefinedExceptionNameObscuringGlobalVariablex   s      	  $$		&r   c                 D    U R                  S[        R                  5        g)ag  Exception names obscure globals, can't be used after.

Last line will raise NameError on Python 3 because the name is
locally unbound after the `except:` block, even if it's
nonlocal. We should issue an error in this case because code
only working correctly if an exception isn't raised, is invalid.
Unless it's explicitly silenced, see false positives below.a   
        exc = 'Original value'
        def func():
            global exc
            try:
                raise ValueError('ve')
            except ValueError as exc:
                pass  # block never entered, exc stays unbound
            exc
        Nr9   r   s    r   3test_undefinedExceptionNameObscuringGlobalVariable28Test.test_undefinedExceptionNameObscuringGlobalVariable2   s      	 	 $$
	&r   c                 D    U R                  S[        R                  5        g)zException names obscure globals, can't be used after. Unless.

Last line will never raise NameError because it's only entered
if no exception was raised.a  
        exc = 'Original value'
        def func():
            global exc
            try:
                raise ValueError('ve')
            except ValueError as exc:
                print('exception logged')
                raise
            exc
        Nr-   r   s    r   @test_undefinedExceptionNameObscuringGlobalVariableFalsePositive1ETest.test_undefinedExceptionNameObscuringGlobalVariableFalsePositive1   s     
 	 
 
	r   c                 D    U R                  S[        R                  5        g)zException names obscure globals, can't be used after. Unless.

Last line will never raise NameError because `error` is only
falsy if the `except:` block has not been entered.aN  
        exc = 'Original value'
        def func():
            global exc
            error = None
            try:
                raise ValueError('ve')
            except ValueError as exc:
                error = 'exception logged'
            if error:
                print(error)
            else:
                exc
        Nr-   r   s    r   @test_undefinedExceptionNameObscuringGlobalVariableFalsePositive2ETest.test_undefinedExceptionNameObscuringGlobalVariableFalsePositive2   s     
 	  	r   c                 &    U R                  S5        g )NzQ
        class a:
            def b():
                fu
        fu = 1
        r   r   s    r   test_functionsNeedGlobalScope"Test.test_functionsNeedGlobalScope   s      	r   c                 &    U R                  S5        g )Nz	range(10)r   r   s    r   test_builtinsTest.test_builtins   s    K r   c                 &    U R                  S5        g)zU
C{WindowsError} is sometimes a builtin name, so no warning is emitted
for using it.
WindowsErrorNr   r   s    r   test_builtinWindowsErrorTest.test_builtinWindowsError       
 	N#r   c                 &    U R                  S5        g)z
Use of the C{__annotations__} in module scope should not emit
an undefined name warning when version is greater than or equal to 3.6.
__annotations__Nr   r   s    r   test_moduleAnnotationsTest.test_moduleAnnotations   s    
 	%&r   c                 &    U R                  S5        g)zP
Use of the C{__file__} magic global should not emit an undefined name
warning.
__file__Nr   r   s    r   test_magicGlobalsFileTest.test_magicGlobalsFile       
 	Jr   c                 &    U R                  S5        g)zT
Use of the C{__builtins__} magic global should not emit an undefined
name warning.
__builtins__Nr   r   s    r   test_magicGlobalsBuiltinsTest.test_magicGlobalsBuiltins   rP   r   c                 &    U R                  S5        g)zP
Use of the C{__name__} magic global should not emit an undefined name
warning.
__name__Nr   r   s    r   test_magicGlobalsNameTest.test_magicGlobalsName   rY   r   c                 d    U R                  S[        R                  5        U R                  SSS9  g)z
Use of the C{__path__} magic global should not emit an undefined name
warning, if you refer to it from a file called __init__.py.
__path__zpackage/__init__.py)filenameNr   r   s    r   test_magicGlobalsPathTest.test_magicGlobalsPath   s'    
 	J0J)>?r   c                     U R                  S[        R                  5        U R                  S5        U R                  S[        R                  5        g)zj
Use of the C{__module__} magic builtin should not emit an undefined
name warning if used in class scope.

__module__z3
        class Foo:
            __module__
        zR
        class Foo:
            def bar(self):
                __module__
        Nr   r   s    r   test_magicModuleInClassScope!Test.test_magicModuleInClassScope   sC    
 	L!//2  	 	  __		r   c                     U R                  S[        R                  5        U R                  S5        U R                  S[        R                  5        g)zl
Use of the C{__qualname__} magic builtin should not emit an undefined
name warning if used in class scope.
__qualname__z5
        class Foo:
            __qualname__
        zT
        class Foo:
            def bar(self):
                __qualname__
        Nr   r   s    r   test_magicQualnameInClassScope#Test.test_magicQualnameInClassScope
  sC    
 	NAOO4  	 	  __		r   c                 b    U R                  S[        R                  [        R                  5        g)z)Can't find undefined names with import *.zfrom fu import *; barN)r   r   ImportStarUsedImportStarUsager   s    r   test_globalImportStarTest.test_globalImportStar  s"    +$$a&7&7	9r   c                 H    U R                  S5        U R                  S5        g)zL
"global" can make an otherwise undefined name in another function
defined.
z@
        def a(): global fu; fu = 1
        def b(): fu
        zC
        def c(): bar
        def b(): global bar; bar = 1
        Nr   r   s    r   test_definedByGlobalTest.test_definedByGlobal  s(    
 	  	 	  	r   c                 &    U R                  S5        g)z%
"global" can accept multiple names.
zS
        def a(): global fu, bar; fu = 1; bar = 2
        def b(): fu; bar
        Nr   r   s    r   !test_definedByGlobalMultipleNames&Test.test_definedByGlobalMultipleNames-  s     	  	r   c                 D    U R                  S[        R                  5        g)z4
A global statement in the global scope is ignored.
zB
        global x
        def foo():
            print(x)
        Nr   r   s    r   test_globalInGlobalScopeTest.test_globalInGlobalScope6  s     	  __		r   c                 b    U R                  S[        R                  [        R                  5        g)z@A global statement does not prevent other names being undefined.zQ
        def f1():
            s

        def f2():
            global m
        N)r   r   r   UnusedIndirectAssignmentr   s    r   test_global_reset_name_only Test.test_global_reset_name_only@  s&     	  __a88	:r   todoc                 D    U R                  S[        R                  5        g)z4An unused global statement does not define the name.zQ
        def f1():
            m

        def f2():
            global m
        Nr   r   s    r   test_unused_globalTest.test_unused_globalL  s     	  __	r   c                 D    U R                  S[        R                  5        g)zDel deletes bindings.za = 1; del a; aNr   r   s    r   test_delTest.test_delW  s    %q7r   c                 &    U R                  S5        g)z%Del a global binding from a function.zY
        a = 1
        def f():
            global a
            del a
        a
        Nr   r   s    r   test_delGlobalTest.test_delGlobal[  s      	r   c                 D    U R                  S[        R                  5        g)zDel an undefined name.zdel aNr   r   s    r   test_delUndefinedTest.test_delUndefinede  s    GQ__-r   c                 &    U R                  S5        g)z(
Ignores conditional bindings deletion.
zq
        context = None
        test = True
        if False:
            del(test)
        assert(test)
        Nr   r   s    r   test_delConditionalTest.test_delConditionali  s     	  	r   c                 &    U R                  S5        g)zP
Ignored conditional bindings deletion even if they are nested in other
blocks.
z
        context = None
        test = True
        if False:
            with context():
                del(test)
        assert(test)
        Nr   r   s    r   test_delConditionalNestedTest.test_delConditionalNestedu  s    
 	  	r   c                 &    U R                  S5        g)zJ
Ignore bindings deletion if called inside the body of a while
statement.
z~
        def test():
            foo = 'bar'
            while False:
                del foo
            assert(foo)
        Nr   r   s    r   test_delWhileTest.test_delWhile  r%   r   c                 &    U R                  S5        g)zt
Ignore bindings deletion if called inside the body of a while
statement and name is used inside while's test part.
z
        def _worker():
            o = True
            while o is not True:
                del o
                o = False
        Nr   r   s    r   test_delWhileTestUsageTest.test_delWhileTestUsage  r%   r   c                 &    U R                  S5        g)z`
Ignore bindings deletions if node is part of while's test, even when
del is in a nested block.
z
        context = None
        def _worker():
            o = True
            while o is not True:
                while True:
                    with context():
                        del o
                o = False
        Nr   r   s    r   test_delWhileNestedTest.test_delWhileNested  s    
 	 	 		r   c                 &    U R                  S5        g)z.Global names are available from nested scopes.zO
        a = 1
        def b():
            def c():
                a
        Nr   r   s    r   test_globalFromNestedScopeTest.test_globalFromNestedScope  r4   r   c                 D    U R                  S[        R                  5        g)zf
Test that referencing a local name that shadows a global, before it is
defined, generates a warning.
z_
        a = 1
        def fun():
            a
            a = 2
            return a
        Nr9   r   s    r   (test_laterRedefinedGlobalFromNestedScope-Test.test_laterRedefinedGlobalFromNestedScope  s     
 	  	r   c                 b    U R                  S[        R                  [        R                  5        g)z
Test that referencing a local name in a nested scope that shadows a
global declared in an enclosing scope, before it is defined, generates
a warning.
z
            a = 1
            def fun():
                global a
                def fun2():
                    a
                    a = 2
                    return a
        N)r   r   r:   r~   r   s    r   )test_laterRedefinedGlobalFromNestedScope2.Test.test_laterRedefinedGlobalFromNestedScope2  s(     	  q99	;r   c                 D    U R                  S[        R                  5        g)z
If a name defined in an enclosing scope is shadowed by a local variable
and the name is used locally before it is bound, an unbound local
warning is emitted, even if there is a class scope between the enclosing
scope and the local scope.
z
        def f():
            x = 1
            class g:
                def h(self):
                    a = x
                    x = None
                    print(x, a)
            print(x)
        Nr9   r   s    r   "test_intermediateClassScopeIgnored'Test.test_intermediateClassScopeIgnored  s      	 	 		r   c                     U R                  S[        R                  5      R                  S   nU R                  (       a  SOSnU R                  UR                  SU45        g)z
Test that referencing a local name in a nested scope that shadows a
variable declared in two different outer scopes before it is defined
in the innermost scope generates an UnboundLocal warning which
refers to the nearest shadowed name.
a  
            def a():
                x = 1
                def b():
                    x = 2 # line 5
                    def c():
                        x
                        x = 3
                        return x
                    return x
                return x
        r   r	      xN)r   r   r:   r   withDoctestassertEqualmessage_args)r   excexpected_line_nums      r   $test_doubleNestingReportsClosestName)Test.test_doubleNestingReportsClosestName  s^     kk    (x+ "&!1!1Aq))C1B+CDr   c                 D    U R                  S[        R                  5        g)zx
Test that referencing a local name in a nested scope that shadows a
global, before it is defined, generates a warning.
z
            def fun():
                a = 1
                def fun2():
                    a
                    a = 1
                    return a
                return a
        Nr9   r   s    r   )test_laterRedefinedGlobalFromNestedScope3.Test.test_laterRedefinedGlobalFromNestedScope3  r0   r   c                     U R                  S[        R                  [        R                  [        R                  [        R                  [        R                  5        g )Nz
            def f(seq):
                a = 0
                seq[a] += 1
                seq[b] /= 2
                c[0] *= 2
                a -= 3
                d += 4
                e[any] = 5
            r   r   s    r   !test_undefinedAugmentedAssignment&Test.test_undefinedAugmentedAssignment  s9    	 OOOOOOQ--OO	
r   c                 &    U R                  S5        g)z*Nested classes can access enclosing scope.z
        def f(foo):
            class C:
                bar = foo
                def f(self):
                    return foo
            return C()

        f(123).f()
        Nr   r   s    r   test_nestedClassTest.test_nestedClass  s     	 		r   c                 D    U R                  S[        R                  5        g)z=Free variables in nested classes must bind at class creation.z
        def f():
            class C:
                bar = foo
            foo = 456
            return foo
        f()
        Nr   r   s    r   test_badNestedClassTest.test_badNestedClass,  s      __	r   c                 &    U R                  S5        g)z+Star and double-star arg names are defined.z?
        def f(a, *b, **c):
            print(a, b, c)
        Nr   r   s    r   test_definedAsStarArgsTest.test_definedAsStarArgs7  s      	r   c                 j    U R                  S5        U R                  S5        U R                  S5        g)z!Star names in unpack are defined.z7
        a, *b = range(10)
        print(a, b)
        z7
        *a, b = range(10)
        print(a, b)
        z=
        a, *b, c = range(10)
        print(a, b, c)
        Nr   r   s    r   test_definedAsStarUnpackTest.test_definedAsStarUnpack>  s9      	 	  	 	  	r   c                 j    U R                  S5        U R                  S5        U R                  S5        g)zC
Star names in unpack are used if RHS is not a tuple/list literal.
z8
        def f():
            a, *b = range(10)
        z:
        def f():
            (*a, b) = range(10)
        z=
        def f():
            [a, *b, c] = range(10)
        Nr   r   s    r   test_usedAsStarUnpackTest.test_usedAsStarUnpackM  s;     	  	 	  	 	  	r   c                 <   U R                  S[        R                  [        R                  5        U R                  S[        R                  [        R                  5        U R                  S[        R                  [        R                  [        R                  5        g)zA
Star names in unpack are unused if RHS is a tuple/list literal.
zC
        def f():
            a, *b = any, all, 4, 2, 'un'
        zL
        def f():
            (*a, b) = [bool, int, float, complex]
        zD
        def f():
            [a, *b, c] = 9, 8, 7, 6, 5, 4
        Nr-   r   s    r   test_unusedAsStarUnpackTest.test_unusedAsStarUnpack^  s}     	  q//	1 	  q//	1 	  q//1A1A	Cr   c                 H    U R                  S5        U R                  S5        g)z#Keyword-only arg names are defined.z>
        def f(*, a, b=None):
            print(a, b)
        z\
        import default_b
        def f(*, a, b=default_b):
            print(a, b)
        Nr   r   s    r   test_keywordOnlyArgsTest.test_keywordOnlyArgso  s&      	
 	  	r   c                 D    U R                  S[        R                  5        g)zTypo in kwonly name.zC
        def f(*, a, b=default_c):
            print(a, b)
        Nr   r   s    r   test_keywordOnlyArgsUndefined"Test.test_keywordOnlyArgsUndefined|  s      __	r   c                 H    U R                  S5        U R                  S5        g)zUndefined annotations.z
        from abc import note1, note2, note3, note4, note5
        def func(a: note1, *args: note2,
                 b: note3=12, **kw: note4) -> note5: pass
        zk
        def func():
            d = e = 42
            def func(a: {1, d}) -> (lambda c: e): pass
        Nr   r   s    r   test_annotationUndefinedTest.test_annotationUndefined  s&      	 	  	r   c                 &    U R                  S5        g )NzR
        from abc import ABCMeta
        class A(metaclass=ABCMeta): pass
        r   r   s    r   test_metaClassUndefinedTest.test_metaClassUndefined  s      	r   c                 H    U R                  S5        U R                  S5        g)zK
Using the loop variable of a generator expression results in no
warnings.
z(a for a in [1, 2, 3] if a)z-(b for b in (a for a in [1, 2, 3] if a) if b)Nr   r   s    r   test_definedInGenExpTest.test_definedInGenExp  s    
 	12CDr   c                     U R                  S[        R                  5        U R                  S[        R                  5        g)ze
The loop variables of generator expressions nested together are
not defined in the other generator.
z-(b for b in (a for a in [1, 2, 3] if b) if b)z-(b for b in (a for a in [1, 2, 3] if a) if a)Nr   r   s    r   test_undefinedInGenExpNested!Test.test_undefinedInGenExpNested  s2    
 	COO	% 	COO	%r   c                     U R                  S5        U R                  S5        U R                  S[        R                  5        U R                  S[        R                  5        g)zZ
Some compatibility code checks explicitly for NameError.
It should not trigger warnings.
zc
        try:
            socket_map
        except NameError:
            socket_map = {}
        z
        try:
            _memoryview.contiguous
        except (NameError, AttributeError):
            raise RuntimeError("Python >= 3.3 is required")
        zY
        try:
            socket_map
        except:
            socket_map = {}
        zc
        try:
            socket_map
        except Exception:
            socket_map = {}
        Nr   r   s    r   test_undefinedWithErrorHandler#Test.test_undefinedWithErrorHandler  s`    
 	  	 	  	 	 
 __	 	 
 __	r   c                 H    U R                  S5        U R                  S5        g)zD
Defined name for generator expressions and dict/set comprehension.
z
        class A:
            T = range(10)

            Z = (x for x in T)
            L = [x for x in T]
            B = dict((i, str(i)) for i in T)
        zu
        class A:
            T = range(10)

            X = {x for x in T}
            Y = {x:x for x in T}
        Nr   r   s    r   test_definedInClassTest.test_definedInClass  s(     	  	 	  	r   c                 &    U R                  S5        g)z9Defined name for nested generator expressions in a class.za
        class A:
            T = range(10)

            Z = (x for x in (a for a in T))
        Nr   r   s    r   test_definedInClassNestedTest.test_definedInClassNested  r4   r   c                     U R                  S[        R                  5        U R                  S[        R                  5        U R                  S[        R                  5        g)z@
The loop variable is defined after the expression is computed.
z9
        for i in range(i):
            print(i)
        z(
        [42 for i in range(i)]
        z(
        (42 for i in range(i))
        Nr   r   s    r   test_undefinedInLoopTest.test_undefinedInLoop  sR     	  __	 	 __	 	 __	r   c                 &    U R                  S5        g)zQ
Defined name referenced from a lambda function within a dict/set
comprehension.
z4
        {lambda: id(x) for x in range(10)}
        Nr   r   s    r   /test_definedFromLambdaInDictionaryComprehension4Test.test_definedFromLambdaInDictionaryComprehension      
 	  	r   c                 &    U R                  S5        g)zO
Defined name referenced from a lambda function within a generator
expression.
z7
        any(lambda: id(x) for x in range(10))
        Nr   r   s    r   !test_definedFromLambdaInGenerator&Test.test_definedFromLambdaInGenerator   r   r   c                 D    U R                  S[        R                  5        g)zS
Undefined name referenced from a lambda function within a dict/set
comprehension.
z4
        {lambda: id(y) for x in range(10)}
        Nr   r   s    r   1test_undefinedFromLambdaInDictionaryComprehension6Test.test_undefinedFromLambdaInDictionaryComprehension	      
 	 __	r   c                 D    U R                  S[        R                  5        g)zQ
Undefined name referenced from a lambda function within a generator
expression.
z7
        any(lambda: id(y) for x in range(10))
        Nr   r   s    r   'test_undefinedFromLambdaInComprehension,Test.test_undefinedFromLambdaInComprehension  r   r   c                 *    SnU R                  U5        g )Nz
        class Test(object):
            def __init__(self):
                print(__class__.__name__)
                self.x = 1

        t = Test()
        r   )r   codes     r   test_dunderClassTest.test_dunderClass  s     	Dr    N)Hr_   rh   rl   __firstlineno__r   r   r   r    r#   r   r'   r*   r.   r2   r6   r;   r>   rA   rD   rG   rJ   rN   rS   rW   r\   r`   re   ri   rm   rr   ru   rx   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r      s   ,3%
0 

AB% C% 0$ 

AB& C&" 

AB& C&("(!$' $ @  9

: 
&\ 8.
 ; $E2
$	"C"E	%>*	r   r   c                       \ rS rSrSrS rSrg)	NameTestsi'  z.
Tests for some extra cases of name handling.
c                     [         R                  " S5      n[        5       UR                  S   R                  S   l        U R                  [        [        R                  U5        g)zR
A Name node with an unrecognized context results in a RuntimeError being
raised.
zx = 10r   N)
astparseobjectbodytargetsctxassertRaisesRuntimeErrorr   Checker)r   trees     r   test_impossibleContext NameTests.test_impossibleContext+  sE    
 yy"&,h		!Q#,>r   r   N)r_   rh   rl   r   __doc__r  r   r   r   r   r   r   '  s    ?r   r   )
r  pyflakesr   r   r   pyflakes.test.harnessr   r   r   r   r   r   r   <module>r     s)    
 + 0]8 ]@? ?r   