| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Python315/Lib/test/__pycache__/ |
Upload File : |
R
>lqj�m c � � Q s ] PHs] PHs] PHs] PHs] PHs] QHGs ] QH G s Qs
QsQ s Q Q\O 2 s Q Q \O 2 s Q
Q\O 2 s\Q6X c \O$ 2 P! P! )
z&
Test the API of the symtable module.
)�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
c �l � U O 2 F D oUO 2 U6X f J Ut ! P! �N)�get_children�get_name)�block�name�chs && �'C:\Python315\\Lib\test\test_symtable.py�
find_blockr � s( � �� � �"��
�;�;�=�D� ��I� #� c �* ` � \ sQ s]�s n \O \QQ2 s\ \Q2 s\ \Q2 s \ \Q2 s
\ \
Q2 s\ \
Q2 s\ \Q2 s
\ \Q 2 s\ \Q
2 s\ \Q
2 s\ \Q2 s\ \Q2 s\ \Q2 s\ \Q2 s\ \Q
2 s\ \Q2 sQ sQ sQ sQ sQ sQ sQ sQ sQ sQ s Q s!Q s"Q s#Q s$Q s%Q s&Q s'Q s(Q! s)Q" s*Q# s+Q$ s,Q% s-Q& s.Q' s/Q( s0Q) s1Q* s2Q+ s3Q, s4Q- s5Q. s6Q/ s7Q0 s8Q1 s9Q2s:U s;P! )3�SymtableTest�?�exec�Mine�a_method�spam�internal�other_internal�foo�Alias�GenericAlias�generic_spam�GenericMine�T�Uc �� � U O U O O 2 Q 2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O
O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 U O U O O 2 Q2 P! )�module�class�functionz
type aliasztype parametersz
type variable)�assertEqual�top�get_typer r r r r r r �GenericAlias_innerr �generic_spam_innerr �GenericMine_innerr r ��selfs &r
� test_type�SymtableTest.test_type� s� � �������*�*�,�h�7�������+�+�-�w�7�������/�/�1�:�>�������+�+�-�z�:�������/�/�1�:�>�������*�*�,�j�9�������,�,�.��=�����*�*�3�3�5�7H�I�����0�0�9�9�;�\�J�����*�*�3�3�5�7H�I�����0�0�9�9�;�Z�H�����)�)�2�2�4�6G�H�����/�/�8�8�:�G�D���������*�O�<���������*�O�<r c �P � U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O
O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 U O U O O 2 ] 2 P! �� )�
assertGreaterr"