Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
util.cpython-313.pyc38 linesDownload Raw Back to __pycache__
1�

2��ja��^�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK3Jr \R"S\R\RS9r\R "\R"S:g=(d \RS:HS5r\R "S\R&;S	5r\R "\R*"5S4:g=(d \R,"S5S5rS
r\R "\"5(+S5rSrSr\R8S5rSrS\S\4Sjrg)�N)�bind_unused_port�
_TestCaseType)�bound�posix�cygwinznon-unix platform�5NO_NETWORKznetwork access disabled�CPython�Py_GIL_DISABLEDzNot CPython implementationc�B�[R(dgSn[R"[R5nURS5 UbUR5 g![a UbUR5 ggf=f!UbUR5 ff=f)NF)z::1rT)�socket�has_ipv6�AF_INET6�bind�OSError�close)�socks �WD:\code\apps\devtools\python\user_packages\Python313\site-packages\tornado/test/util.py�_detect_ipv6r!s����?�?���D���}�}�V�_�_�-���	�	�*�����J�J�L���������J�J�L�������J�J�L��s#�5A$�$6B�.B�B�B�Bzipv6 support not presentc��[5upURS5 [R"5nURSU45 UR	5up4UR5 UR5 UR7US4$)z�Returns a local port number that will refuse all connections.8 9Return value is (cleanup_func, port); the cleanup function10must be called to free the port to be reused.11Tz	127.0.0.1�)r�setblockingr�connect�acceptr)�
server_socket�port�
client_socket�conn�client_addrs     r�
refusing_portr5sv��+�,��M����d�#��M�M�O�M����;��-�.�%�,�,�.��D��J�J�L���������Q��0�0�c�b�[U40UD6n0n[[R"U5X45 U$)z�Execute ``s`` in a given context and return the result namespace.12 13Used to define functions for tests in particular python14versions that would be syntax errors in older versions.15)�dict�exec�textwrap�dedent)�caller_globals�
caller_locals�s�global_namespace�local_namespaces     r�	exec_testr+Is3���N�<�m�<���O������	�-�?��r c#�# �[R"5 [R"S[5 Sv� SSS5 g!,(df   g=f7f)z/Context manager to ignore deprecation warnings.�ignoreN)�warnings�catch_warnings�simplefilter�DeprecationWarning�r r�ignore_deprecationr3Xs2���16�	 �	 �	"����h�(:�;�
�17#�	"�	"�s�A� A�	A�18A�Azabstract base class�cls�returnc�$^�"U4SjSU5mT$)a�Decorator to mark a test class as an "abstract" base class.19 20This is different from a regular abstract base class because21we do not limit instantiation of the class. (If we did, it would22interfere with test discovery). Instead, we prevent the tests from23being run.24 25Subclasses of an abstract base test are run as normal. There is26no support for the ``@abstractmethod`` decorator so there is no runtime27check that all such methods are implemented.28 29Note that while it is semantically cleaner to modify the test loader30to exclude abstract base tests, this is more complicated and would31interfere with third-party test runners. This approach degrades32gracefully to other tools such as editor-integrated testing.33c�6>^�\rSrSr\UU4Sj5rSrU=r$)�/abstract_base_test.<locals>.AbstractBaseWrapper�wc�`>�UTLa[R"[5e[TU]5 g)N)�unittest�SkipTest�ABT_SKIP_MESSAGE�super�34setUpClass)r4�AbstractBaseWrapper�	__class__s ��rr?�:abstract_base_test.<locals>.AbstractBaseWrapper.setUpClassxs,����)�)��'�'�(8�9�9��%�s�6�8r r2)�__name__�35__module__�__qualname__�__firstlineno__�classmethodr?�__static_attributes__�
__classcell__)rAr@s@�rr@r8ws���	�	9�36�	9r r@r2)r4r@s @r�abstract_base_testrJcs���(9�c�9��r ) �37contextlib�os�platformr�sys�	sysconfigr$�typingr;r.�tornado.testingr�TypeVar�Type�TestCaser�skipIf�name�
skipIfNonUnix�environ�skipIfNoNetwork�python_implementation�get_config_var�skipNotCPythonr�skipIfNoIPv6rr+�contextmanagerr3r=rJr2r r�<module>r_s ���	��
�38���
���,�����f�k�k�(�BS�BS�6T�U�
�����G�G�w��2�#�,�,�(�2�4G��
��/�/�,�"�*�*�"<�>W�X�����
�"�"�$�	�1�3���� 1�2� ����"���<�>�1�3M�N��1�(�������)���M��m�r 
codekingpro/portable-devtools · Team Ai