OwlCyberSecurity - MANAGER
Edit File: outcomes.cpython-311.pyc
� ������h(�����������������������h����d�Z�ddlZddlZddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlm Z �dd lm Z �dd lmZ�dZ e rddlmZ�ndd lmZ�eZ�G�d��de������������ZeefZ�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�e dedef����������������������Z�e de e����������������������Z�G�d��deeef���������������������Zdedeegeeef���������f���������fd�Z�ee������������ �d3dd �d!ed"ee���������d#ee���������defd$���������������Z�ee������������ �d4ddd%�d!ed&e d#ee���������defd'���������������Z!�ee������������d5d!ed)e d#ee���������defd*���������������Z" �d6d+ed!ed#ee���������defd,�Z#�G�d-��d.e������������Z$�ee$������������d4d!edefd/���������������Z% �d7d0ed1ee���������d!ee���������defd2�Z&dS�)8zZException classes and constants handling test outcomes as well as functions creating them.�����N)�Any)�Callable)�cast)�NoReturn)�Optional)�Type)�TypeVar)�KEYWORD_MSG_ARGF)�Protocol)�Genericc��������������������N�������e�Zd�ZdZd dee���������deddf��fd� Zdefd�ZeZ ��xZ S�) �OutcomeExceptionzmOutcomeException and its subclass instances indicate and contain info about test and collection outcomes.NT�msg�pytrace�returnc������������������&�����|�^t����������|t����������������������sId}t����������|���������������������t ����������|�������������j��������t ����������|������������j���������������������������������t ���������������������������������������������|�������������||�_��������||�_ ��������d�S�)NzY{} expected string as 'msg' parameter, got '{}' instead. Perhaps you meant to use a mark?) � isinstance�str� TypeError�format�type�__name__�super�__init__r���r���)�selfr���r���� error_msg� __class__s��� ��a/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/_pytest/outcomes.pyr���zOutcomeException.__init__ ���s|��������?�:�c�3�#7�#7�?�3�� ���I�,�,�T�$�Z�Z�-@�$�s�)�)�BT�U�U�V�V�V� ���������������������c������������������>�����|�j����������|�j���������S�d|�j��������j����������d�S�)N�<z instance>)r���r���r���)r���s��� r����__repr__zOutcomeException.__repr__+���s'�������8���8�O�6�4�>�*�6�6�6�6r���)NT)r���� __module__�__qualname__�__doc__r���r����boolr���r"����__str__� __classcell__�r���s���@r���r���r������s{���������������+��+� �� �H�S�M�� �4�� �4�� �� �� �� �� �� �7�#��7��7��7��7� ��G�G�G�G�Gr���r���c��������������������R�������e�Zd�ZdZ � � �ddd�dee���������deded ed df ��fd�Z��xZS�) �Skipped�builtinsNTF)�_use_item_locationr���r����allow_module_levelr-���r���c�����������������j������t���������������������������������������������||��������������||�_��������||�_��������d�S�)N�r���r���)r���r���r.���r-���)r���r���r���r.���r-���r���s��� �r���r���zSkipped.__init__;���s:�������� �����S�'��2�2�2�"4����#5����r���)NTF)r���r#���r$���r���r���r&���r���r(���r)���s���@r���r+���r+���6���s������������������J��"��#(� 5��$)� 5��5��5� �c�]�5���5��!� 5��!� 5�� �5��5��5��5��5��5��5��5��5��5r���r+���c�������������������������e�Zd�ZdZdZdS�)�Failedz.Raised from an explicit call to pytest.fail().r,���N�r���r#���r$���r%�����r���r���r2���r2���J���s��������������8�8��J�J�Jr���r2���c��������������������@�������e�Zd�ZdZ �ddedee���������ddf��fd� Z��xZS�) �Exitz=Raised for immediate program exits (no tracebacks/summaries).�unknown reasonNr���� returncoder���c������������������f������||�_���������||�_��������t���������������������������������������������|�������������d�S��N)r���r8���r���r���)r���r���r8���r���s��� �r���r���z Exit.__init__S���s1�����������$��� ����������r���)r7���N) r���r#���r$���r%���r���r����intr���r(���r)���s���@r���r6���r6���P���sk���������������G�G��HL������7?��}�� �������������������r���r6����_F.)�bound�_ETc��������������������$�����e�Zd�ZU�eed<���eed<���dS�)�_WithException� Exception�__call__N)r���r#���r$���r>����__annotations__r<���r4���r���r���r@���r@���b���s"�����������������N�N�N��L�L�L�L�Lr���r@����exception_typer���c������������������T�������dt�����������dt����������t�����������t����������f���������f��fd�}|S�)N�funcr���c������������������d������t����������t����������t����������t����������f���������|�������������}�|_��������|S�r:���)r���r@���r<���r>���rA���)rF����func_with_exceptionrD���s��� �r����decoratez!_with_exception.<locals>.decorateh���s+�������"�>�"�c�'�#:�D�A�A��(6��%�"�"r���)r<���r@���r>���)rD���rI���s���` r����_with_exceptionrJ���g���s?�������#�r��#�n�R��W�5��#��#��#��#��#��#� ��Or�����)r����reasonr8���r���c�����������������������d}ddl�m}�|�r |r�|d�������������|�s8|��|d�������������t����������j��������t ����������j��������d�������������d � �������������|}�t ����������|�|�������������)ax��Exit testing process. :param reason: The message to show as the reason for exiting pytest. reason has a default value only because `msg` is deprecated. :param returncode: Return code to be used when exiting pytest. :param msg: Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead. Tr����� UsageErrorzHcannot pass reason and msg to exit(), `msg` is deprecated, use `reason`.Nz!exit() requires a reason argument�exit�rF��������� stacklevel)�_pytest.configrO����warnings�warnr ���r���r6���)rL���r8���r����__tracebackhide__rO���s��� r���rP���rP���s���s������� ���)�)�)�)�)�)� �� �#�� ��j�V� �� �� ������;��*�@�A�A�A�� �o�,�&�9�9�9�a�H�H�H�H��� �v�z� "� "�"r���)r.���r���r.���c�����������������J�����d}t����������d|�|������������}�t����������|�|��������������)a`��Skip an executing test with the given message. This function should be called only during testing (setup, call or teardown) or during collection by using the ``allow_module_level`` flag. This function can be called in doctests as well. :param reason: The message to show the user as reason for the skip. :param allow_module_level: Allows this function to be called at module level. Raising the skip exception at module level will stop the execution of the module and prevent the collection of all tests in the module, even those defined before the `skip` call. Defaults to False. :param msg: Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead. .. note:: It is better to use the :ref:`pytest.mark.skipif ref` marker when possible to declare a test to be skipped under certain conditions like mismatching platforms or dependencies. Similarly, use the ``# doctest: +SKIP`` directive (see :py:data:`doctest.SKIP`) to skip a doctest statically. T�skip)r���r.���)�_resolve_msg_to_reasonr+���)rL���r.���r���rX���s��� r���rZ���rZ�������s/������>��� #�F�F�C� 8� 8�F� �f�1C� D� D� D�Dr���Tr���c������������������J�����d}t����������d|�|������������}�t����������|�|��������������)a���Explicitly fail an executing test with the given message. :param reason: The message to show the user as reason for the failure. :param pytrace: If False, msg represents the full failure information and no python traceback will be reported. :param msg: Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead. T�failr0���)r[���r2���)rL���r���r���rX���s��� r���r]���r]�������s.��������� #�F�F�C� 8� 8�F� �V�W� -� -� -�-r���� func_namec�����������������������d}|�B|rddl�m}��|d|���d��������������t����������j��������t ����������j��������|��������������d� �������������|}|S�) a��� Handles converting the deprecated msg parameter if provided into reason, raising a deprecation warning. This function will be removed when the optional msg argument is removed from here in future. :param str func_name: The name of the offending function, this is formatted into the deprecation message. :param str reason: The reason= passed into either pytest.fail() or pytest.skip() :param str msg: The msg= passed into either pytest.fail() or pytest.skip(). This will be converted into reason if it is provided to allow pytest.skip(msg=) or pytest.fail(msg=) to continue working in the interim period. :returns: The value to use as reason. TNr���rN���z.Passing both ``reason`` and ``msg`` to pytest.z(...) is not permitted.rQ�������rS���)�pytestrO���rV���rW���r ���r���)r^���rL���r���rX���rO���s��� r���r[���r[�������sz������.��� ���� �)�)�)�)�)�)��*�c��c�c�c����� �� � �o�,�)�<�<�<��K�K�K�K����Mr���c�������������������������e�Zd�ZdZdS�)�XFailedz/Raised from an explicit call to pytest.xfail().Nr3���r4���r���r���rc���rc�������s��������������9�9�9�9r���rc���c������������������$�����d}t����������|��������������)a���Imperatively xfail an executing test or setup function with the given reason. This function should be called only during testing (setup, call or teardown). :param reason: The message to show the user as reason for the xfail. .. note:: It is better to use the :ref:`pytest.mark.xfail ref` marker when possible to declare a test to be xfailed under certain conditions like known bugs or missing features. T)rc���)rL���rX���s��� r����xfailre�������s��������� �&�/�/�r����modname� minversionc�����������������������ddl�}d}t����������|�dd��������������|j����������������������5���|j��������d������������� �t ����������|��������������n.#�t ����������$�r!}|�d|��d|���}t ����������|d� ������������d�d}~ww�xY�w �ddd�������������n#�1�swxY�w�Y���t����������j��������|����������}|�|S�t����������|d d������������}|�:ddl m}�|��||�������������||������������k�����rt ����������d|��d |�d|��d� �������������|S�)av��Import and return the requested module ``modname``, or skip the current test if the module cannot be imported. :param modname: The name of the module to import. :param minversion: If given, the imported module's ``__version__`` attribute must be at least this minimal version, otherwise the test is still skipped. :param reason: If given, this reason is shown as the message when the module cannot be imported. :returns: The imported module. This should be assigned to its canonical name. Example:: docutils = pytest.importorskip("docutils") r���NTrK����eval�ignorezcould not import z: )r.����__version__)�Versionzmodule z has __version__ z, required is: )rV����compile�catch_warnings�simplefilter� __import__�ImportErrorr+����sys�modules�getattr�packaging.versionrl���) rf���rg���rL���rV���rX����exc�mod�verattrrl���s ��� r����importorskipry�����s������,��O�O�O����G�R�� � � � �� � "� "�� E�� E�� ���h�'�'�'� E��w�������� E�� E�� E��~�?�W�?�?�#�?�?���&�T�:�:�:��D����� E����� � E�� E�� E�� E�� E�� E�� E�� E�� E�� E�� E����� E�� E�� E�� E���+�g� �C���� ��c�=�$�/�/�G���-�-�-�-�-�-��?�g�g�g�.�.����1D�1D�D�D��'��7�7�G�G�G�Z�Z�1�#'������� � ��Js4����B�A �B� A4�A/�/A4�4B�B�B)rK���N)rK���)rK���TNr:���)NN)'r%���rr���rV����typingr���r���r���r���r���r���r ����_pytest.deprecatedr ���� TYPE_CHECKING�typing_extensionsr���r���� BaseExceptionr���rA����TEST_OUTCOMEr+���r2���r6����objectr<���r>���r@���rJ���r���r;���rP���r&���rZ���r]���r[���rc���re���ry���r4���r���r����<module>r�������sl�������� � � � �������������������������������������������������������������������������������������������.��.��.��.��.��.�� ����*�*�*�*�*�*�*� ��������H����������}�������.�!�)�,��5��5��5��5��5���5��5��5�(��������� ����������������9�������� �W�T��#�v�+�.�/�/�/�� �g�e�4� �.�/�/�/�����������X�b�#�g�&������� �C���H�b�T�>�"�c�'�;R�5R�,S���������������26�#�PT�#��#��#��#�"*�3�-�#�@H�� �#� �#��#��#����#�<������� E�49�PT� E�� E�� E�� E�-1� E�@H�� � E� � E�� E�� E���� E�F������.��.���.�D��.�h�s�m��.�x��.��.��.����.�&�7;�!��!��!��!�&.�s�m�!��!��!��!��!�H:��:��:��:��:�f��:��:��:����������#���x�����������$�MQ�4��4� �4�&�s�m�4�<D�S�M�4��4��4��4��4��4��4r���