ރ(o#-SSKrSSKrSSKrSSKJr SSKJr SrSrSr "SS\R5r "S S \R5r \ S :Xa\R"5 gg) N)support) os_helpera import sys glob = 42 some_var = 12 some_non_assigned_global_var: int some_assigned_global_var = 11 class Mine: instance_var = 24 def a_method(p1, p2): pass def spam(a, b, *var, **kw): global bar global some_assigned_global_var some_assigned_global_var = 12 bar = 47 some_var = 10 x = 23 glob def internal(): return x def other_internal(): nonlocal some_var some_var = 3 return some_var return internal def foo(): pass def namespace_test(): pass def namespace_test(): pass type Alias = int type GenericAlias[T] = list[T] def generic_spam[T](a): pass class GenericMine[T: int, U: (int, str) = int]: pass aS # The following symbols are defined in ComplexClass # without being introduced by a 'global' statement. glob_unassigned_meth: Any glob_unassigned_meth_pep_695: Any glob_unassigned_async_meth: Any glob_unassigned_async_meth_pep_695: Any def glob_assigned_meth(): pass def glob_assigned_meth_pep_695[T](): pass async def glob_assigned_async_meth(): pass async def glob_assigned_async_meth_pep_695[T](): pass # The following symbols are defined in ComplexClass after # being introduced by a 'global' statement (and therefore # are not considered as local symbols of ComplexClass). glob_unassigned_meth_ignore: Any glob_unassigned_meth_pep_695_ignore: Any glob_unassigned_async_meth_ignore: Any glob_unassigned_async_meth_pep_695_ignore: Any def glob_assigned_meth_ignore(): pass def glob_assigned_meth_pep_695_ignore[T](): pass async def glob_assigned_async_meth_ignore(): pass async def glob_assigned_async_meth_pep_695_ignore[T](): pass class ComplexClass: a_var = 1234 a_genexpr = (x for x in []) a_lambda = lambda x: x type a_type_alias = int type a_type_alias_pep_695[T] = list[T] class a_class: pass class a_class_pep_695[T]: pass def a_method(self): pass def a_method_pep_695[T](self): pass async def an_async_method(self): pass async def an_async_method_pep_695[T](self): pass @classmethod def a_classmethod(cls): pass @classmethod def a_classmethod_pep_695[T](self): pass @classmethod async def an_async_classmethod(cls): pass @classmethod async def an_async_classmethod_pep_695[T](self): pass @staticmethod def a_staticmethod(): pass @staticmethod def a_staticmethod_pep_695[T](self): pass @staticmethod async def an_async_staticmethod(): pass @staticmethod async def an_async_staticmethod_pep_695[T](self): pass # These ones will be considered as methods because of the 'def' although # they are *not* valid methods at runtime since they are not decorated # with @staticmethod. def a_fakemethod(): pass def a_fakemethod_pep_695[T](): pass async def an_async_fakemethod(): pass async def an_async_fakemethod_pep_695[T](): pass # Check that those are still considered as methods # since they are not using the 'global' keyword. def glob_unassigned_meth(): pass def glob_unassigned_meth_pep_695[T](): pass async def glob_unassigned_async_meth(): pass async def glob_unassigned_async_meth_pep_695[T](): pass def glob_assigned_meth(): pass def glob_assigned_meth_pep_695[T](): pass async def glob_assigned_async_meth(): pass async def glob_assigned_async_meth_pep_695[T](): pass # The following are not picked as local symbols because they are not # visible by the class at runtime (this is equivalent to having the # definitions outside of the class). global glob_unassigned_meth_ignore def glob_unassigned_meth_ignore(): pass global glob_unassigned_meth_pep_695_ignore def glob_unassigned_meth_pep_695_ignore[T](): pass global glob_unassigned_async_meth_ignore async def glob_unassigned_async_meth_ignore(): pass global glob_unassigned_async_meth_pep_695_ignore async def glob_unassigned_async_meth_pep_695_ignore[T](): pass global glob_assigned_meth_ignore def glob_assigned_meth_ignore(): pass global glob_assigned_meth_pep_695_ignore def glob_assigned_meth_pep_695_ignore[T](): pass global glob_assigned_async_meth_ignore async def glob_assigned_async_meth_ignore(): pass global glob_assigned_async_meth_pep_695_ignore async def glob_assigned_async_meth_pep_695_ignore[T](): pass cbUR5HnUR5U:XdMUs $ gN) get_childrenget_name)blocknamechs 9/opt/alt/python313/lib64/python3.13/test/test_symtable.py find_blockr s(  " ;;=D I#c\rSrSr\R"\SS5r\"\S5r\"\S5r \"\S5r \"\ S5r \"\ S5r \"\S 5r \"\S 5r\"\S 5r\"\S 5r\"\S 5r\"\S 5r\"\S 5r\"\S 5r\"\S5r\"\S5rSrSrSrSrSrSrSrSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&S r'S!r(S"r)S#r*S$r+S%r,S&r-S'r.S(r/S)r0S*r1S+r2S,r3g-). SymtableTest?execMinea_methodspaminternalother_internalfooAlias GenericAlias generic_spam GenericMineTUcURURR5S5 URURR5S5 URURR5S5 URUR R5S5 URUR R5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URURR5S5 URUR R5S5 g)Nmoduleclassfunctionz type aliasztype parametersz type variable) assertEqualtopget_typerrrrrrrGenericAlias_innerrgeneric_spam_innerrGenericMine_innerrrselfs r test_typeSymtableTest.test_types **,h7 ++-w7 //1:> ++-z: //1:> **,j9 ,,. = **3357HI 0099;\J **3357HI 0099;ZH ))2246GH //88:GD *O< *O? )).9CCEF  ((/99;< (FGQQST (BCMMOPrc<URURRS5R55 UR UR RS5R55 SnUR UR R5U5 g)NrK)rK)r4rr\ is_nonlocalr6rr$ get_nonlocalsr+rVs r test_nonlocalSymtableTest.test_nonlocal sr ))*5AACD ++22:>JJLM  ,,::?rcSH;nURURRU5R55 M= UR URRS5R55 g)N)rGrJrIrL)r6rr\ is_parameterr4)r+syms r test_parametersSymtableTest.test_parameters"sV%C OODII,,S1>>@ A& ))#.;;=>rcUR[URR55[URR 555 UR [ URRS5 g)Nnot_here)r$lenr%get_identifiers get_symbols assertRaisesKeyErrorr\r*s r test_symbol_lookupSymtableTest.test_symbol_lookup'sU TXX5578TXX1134 6 (DHHOOZ@rcURURRS5R55 URURRS5R55 URURRS5R55 URUR RS5R55 URURRS5R55 UR UR RS5R55 URURRS5R5UR L5 URRS5nUR[UR55S5 UR[UR5 URRS5nUR[UR55S 5 UR[UR5 g) Nrrrrnamespace_testrLrNr) r6r%r\ is_namespacerrr4 get_namespacer$rzget_namespacesr} ValueError)r+ns_test ns_test_2s r test_namespacesSymtableTest.test_namespaces-s /<<>?  ((4AACD /<<>?  ((4AACD (89FFHI ))#.;;=> /==?499LM((//"23 W3356: *g&;&;<HHOOF+  Y5578!< *i&=&=>rc4URURRS5R55 URURRS5R55 URURRS5R55 URUR RS5R55 UR URRS5R55 g)NrLrMrr)r6rr\ is_assignedr%rr4rr*s r test_assignedSymtableTest.test_assigned>s  ((-99;<  ((/;;=> /;;=>  ((4@@BC --c2>>@Arc8[R"SSS5nUR5SnURURS5R 55 URURS5R 55 UR URS5R55 [R"SSS5nUR5SnURURS5R 55 UR URS5R 55 [R"SSS5nURURS5R55 [R"SSS5ng) Nzdef f(): x: int testrrrLzdef f(): x = 1 zglobal x x: intz=def g(): x = 2 def f(): nonlocal x x: int)symtablerr6r\rh is_annotatedr4r])r+st1st2st3st4st5st6s r test_annotatedSymtableTest.test_annotatedEs9 8&&I #  30023  34467 C2245 7H #  30023 C5578 2FFC  31134!- !' 0rctURURRS5R55 g)Nsys)r6r%r\ is_importedr*s r test_importedSymtableTest.test_imported^s$ .::<=rcrURURR5S5 URURR5S5 URURR S5R5S5 URUR R5S5 g)Nr%rrLr)r$r%rrr\rr*s r test_nameSymtableTest.test_nameas **,e4 ++-v6 ))#.7793? ++-v6rc ^TRTRR5S5 [R"[SS5n[ US5nTRUR5S5 U4SjnSnUHqnTR US9 U"US 5 SSS5 TR US S 9 U"S RUS 45S 5 U"S RS U45S 5 SSS5 Ms SHnSUS3SUS3SUS3SUS34HwnTR US9 U"US5 SSS5 UHMnTR XWS9 U"S RXW45S5 U"S RXu45S5 SSS5 MO My M g!,(df  N=f!,(df  GM1=f!,(df  N=f!,(df  M=f)N)rrr ComplexClass)ra_method_pep_695an_async_methodan_async_method_pep_695 a_classmethoda_classmethod_pep_695an_async_classmethodan_async_classmethod_pep_695a_staticmethoda_staticmethod_pep_695an_async_staticmethodan_async_staticmethod_pep_695 a_fakemethoda_fakemethod_pep_695an_async_fakemethodan_async_fakemethod_pep_695glob_unassigned_methglob_unassigned_meth_pep_695glob_unassigned_async_meth"glob_unassigned_async_meth_pep_695glob_assigned_methglob_assigned_meth_pep_695glob_assigned_async_meth glob_assigned_async_meth_pep_695c>[R"US5n[R"SU3SS5n[US5nTR UR 5U5 g)Nz z class A: rrA)textwrapindentrr r$ get_methods)bodyexpected_methodsindentedr%thisr+s r check_body7SymtableTest.test_class_get_methods..check_bodysTtW5H##j $;S&ICc3'D   T--/1A Br)zx = (x for x in [])zx = (x async for x in [])z3type x[genexpr = (x for x in [])] = (x for x in [])z?type x[genexpr = (x async for x in [])] = (x async for x in [])zgenexpr = (x for x in [])zgenexpr = (x async for x in [])z9type genexpr[genexpr = (x for x in [])] = (x for x in [])zEtype genexpr[genexpr = (x async for x in [])] = (x async for x in []))genT)risvar z genexpr = 1)z()z(x)z(x, y)z(z: T)z def genexprz:passzasync def genexprzdef genexpr[T]zasync def genexpr[T])rU)genexpr)rrU)r$rrrTEST_COMPLEX_CLASS_CODEr subTestjoin)r+r%rrGENEXPRSr paramlistrUs` r test_class_get_methods#SymtableTest.test_class_get_methodsgs ..0-@ 7fE#~. ))+ . , C  C#&3#'#T2499c=%9:B?499mS%9:B?32 ;Ii[.#I;e4  51&yk7  \\t\,t\2-$C#9"499c[#9<H"499d[#9<H:9$;'&32-, :9s0 F25F F23G  F  F/ 2 G  G cF^U4SjnU"SS5 U"SS5 [R"SSS5 TR[5 [R"S[S5S5 SSS5 TR[5 [R"S[ S5S5 SSS5 TR[5 [R"S[ S5S5 SSS5 g!,(df  N=f!,(df  N_=f!,(df  g=f) Nc8>[R"USS5 TRSU<35 g![a^nTRURS5 TRUR S5 TRUR U5 SnAgSnAff=f)Nrrzno SyntaxError for )rfail SyntaxErrorr$filenamelinenooffset) brokencoderer+s r checkfilename9SymtableTest.test_filename_correct..checkfilenames} C!!*ff=  ZAB  3  V4  1-  622 3s1 BABBzdef f(x): foo)(rBzdef f(x): global x passsspamr)rr} TypeError bytearray memoryviewlist)r+rs` r test_filename_correct"SymtableTest.test_filename_corrects C ',*B/&'62   y )   fi&8& A*   y )   fj&96 B*   y )   fd7mV <* ) * ) ) ) ) )s$"C0"D"D0 C> D D c4[R"SSS5ng)N42revalrr+symbolss r test_evalSymtableTest.test_evals##D#v6rc4[R"SSS5ng)Nrrsinglerrs r test_singleSymtableTest.test_singles##D#x8rc4[R"SSS5ng)Nzdef f(x): return xrrrrs r test_execSymtableTest.test_execs##$8#vFrc[R"[RS5SS5nUR[ US55 Sn[R"USS5nUR[ US55 g)Nutf8rrrs+# -*- coding: iso8859-15 -*- class : pass uŽ)r TEST_CODEencodeassertIsNotNoner )r+r%codes r test_bytesSymtableTest.test_bytessd 0 0 8#vF ZV45Bc62 ZX67rcUR[UR5S5 UR[UR5S5 g)Nzz$)r$strr%rr*s r test_symtable_reprSymtableTest.test_symtable_reprs4 TXX(DE TYY)OPrcUR[URRS55S5 UR[URRS55S5 UR[URRS55S5 UR[URRS55S5 UR[URRS 55S 5 UR[URRS 55S 5 UR[UR RS 55S5 g)NrNz%rMz5rGzrz)rz+rLzrKz5)r$reprrr\rrr*s r test_symbol_reprSymtableTest.test_symbol_reprs dii..v67@ B dii..u56P R dii..s349 ; dii..z:;D F dii../?@AF H dmm223782 4 d1188DEP RrcSURR5SURR5S3nUR[ URR 5U5 g)Nz)r%r0rCr$r_tablerds r test_symtable_entry_repr%SymtableTest.test_symtable_entry_reprsN)$((//*;)2L#L.Ac>2L#L.AS-0K"; >;$A;$A=" 92 3 2 5< QH P=@ ? A ?"B02>7 GIR=,79G8QR :rrc$\rSrSrSrSrSrSrg)CommandLineTestiNc[RnUR[RU5 [ US5nUR [ 5 SSS5 [R"5n[R"U/5 SSS5 WR5nURSU5 URSU5 UR5nURSU<S3U5 URSU5 URSU5 URSU5 URS U5 g!,(df  N=f!,(df  N=f) Nwz z z"symbol table for module from file :z" local symbol 'glob': def_localz* global_implicit symbol 'glob': usez" local symbol 'spam': def_localz% symbol table for function 'spam':)rTESTFN addCleanupunlinkopenwriterrcaptured_stdoutrmaingetvalueassertIn assertNotIn splitlines)r+rfstdoutoutliness r test_fileCommandLineTest.test_files##  (((3 (C A GGI !  $ $ && MM8* %'oo fc" 3'  :8,aH%P :EB BEJ :EB =uE! & &sD40E4 E Ec[R"5nUR[5 UR S5 [R "5n[ R"/5 SSS5 WR5nUR S5 [R "5n[ R"S/5 SSS5 URUR5U5 SSS5 WR5nURSU5 g!,(df  N=f!,(df  Nj=f!,(df  NS=f)Nr-z,symbol table for module from file '':) rcaptured_stdinrrseekrrrrr$r r)r+stdinr"r#r$s r test_stdinCommandLineTest.test_stdins  # # % KK " JJqM((*f b!+//#C JJqM((*f se$+   V__. 4&  DeL+*+*& %s;D4'D#?(D4 D D4# D1 -D44 Er)r r rrmaxDiffr%r,rrrr rrsGF" Mrr__main__)rrunittestrr test.supportrrrr TestCaserrr rrrr r3so "+  Zpf {:8$${:| Mh'' MF z MMOr