OwlCyberSecurity - MANAGER
Edit File: test_open.cpython-312.pyc
� ����Z��gz ����������������������������d�dl�Z�d�dlZddlmZ��G�d��dej ������������������e�j�������������������������Z�G�d��dej ������������������e�j�������������������������Z�G�d��d �������Z �G�d ��de ej������������������e�j�������������������������Z�G�d��d e ej������������������e�j�������������������������Z�G�d��de ej������������������e�j�������������������������Z�G�d��de ej������������������e�j�������������������������Zedk(��r�e�j"���������������������������yy)�����N����)�utilc�������������������������e�Zd�Zd��Zy)�CommonBinaryTestsc�����������������������t��������j������������������|�������j������������������|�������}|j������������������d�������5�� �d�d�d���������y�#�1�sw�Y���y�xY�w)N�rb�� resources�files�joinpath�open��self�package�path�targets��� �R/opt/hc_python/lib/python3.12/site-packages/importlib_resources/tests/test_open.py�executezCommonBinaryTests.execute ���s6����������)�2�2�4�8�� �[�[�� ���� � �s����A�A N��__name__� __module__�__qualname__r����������r���r���r�������������r���r���c�������������������������e�Zd�Zd��Zy)�CommonTextTestsc�����������������������t��������j������������������|�������j������������������|�������}|j������������������d��������5�� �d�d�d���������y�#�1�sw�Y���y�xY�w)N�utf-8��encodingr ���r���s��� r���r���zCommonTextTests.execute���s8����������)�2�2�4�8�� �[�[�'�[� *���+� *� *�s����A�ANr���r���r���r���r���r������r���r���r���c��������������������0�����e�Zd�Zd��Zd��Zd��Zd��Zd��Zd��Zy)� OpenTestsc����������� ������������t��������j������������������|�j�������������������������dz��}|j������������������d�������5�}|j ��������������������������}|�j������������������|t ��������t��������d����������������������d�d�d���������y�#�1�sw�Y���y�xY�w)Nzbinary.filer�������)r ���r����datar ����read�assertEqual�bytes�range�r���r����fp�results��� r����test_open_binaryzOpenTests.test_open_binary���sV������������+�m�;�� �[�[�� �"��W�W�Y�F����V�U�5��8�_�5��� � �s����5A2�2A;c������������������������t��������j������������������|�j�������������������������dz��}|j������������������d��������5�}|j ��������������������������}|�j������������������|d��������d�d�d���������y�#�1�sw�Y���y�xY�w)Nz utf-8.filer���r ���zHello, UTF-8 world! �r ���r���r&���r ���r'���r(���r+���s��� r����test_open_text_default_encodingz)OpenTests.test_open_text_default_encoding���sQ������������+�l�:�� �[�[�'�[� *�b��W�W�Y�F����V�%<�=��+� *� *�s����#A!�!A*c������������������������t��������j������������������|�j�������������������������dz��}|j������������������dd��������5�}|j ��������������������������}d�d�d���������|�j������������������d��������y�#�1�sw�Y����xY�w)N�utf-16.filezutf-16�strict�r!����errorszHello, UTF-16 world! r0���r+���s��� r����test_open_text_given_encodingz'OpenTests.test_open_text_given_encoding#���sU������������+�m�;�� �[�[�(�8�[� <���W�W�Y�F��=�����!9�:��=� <�s����A"�"A+c������������������l����t��������j������������������|�j�������������������������dz��}|j������������������dd��������5�}|�j ������������������t ��������|j��������������������������ddd��������|j������������������dd��������5�}|j ��������������������������}ddd��������|�j������������������d��������y#�1�sw�Y����HxY�w#�1�sw�Y����(xY�w)zD Raises UnicodeError without the 'errors' argument. r3���r���r4���r5���N�ignorez*H�e�l�l�o�,� �U�T�F�-�1�6� �w�o�r�l�d�!� �)r ���r���r&���r ����assertRaises�UnicodeErrorr'���r(���r+���s��� r����test_open_text_with_errorsz$OpenTests.test_open_text_with_errors)���s��������������+�m�;�� �[�[�'�(�[� ;�r����l�B�G�G�4��<� �[�[�'�(�[� ;�r��W�W�Y�F��<����� 7� � �<� ;�� ;� ;�s����!B�2B*�B'�*B3c�����������������������t��������j������������������|�j�������������������������dz��}|�j������������������t���������������5��|j������������������d��������d�d�d���������y�#�1�sw�Y���y�xY�w)N�does-not-existr����r ���r���r&���r:����FileNotFoundErrorr ����r���r���s��� r����"test_open_binary_FileNotFoundErrorz,OpenTests.test_open_binary_FileNotFoundError9���sA������������+�.>�>�� � � �0� 1��K�K����2� 1� 1�s����A�Ac�����������������������t��������j������������������|�j�������������������������dz��}|�j������������������t���������������5��|j������������������d���������d�d�d���������y�#�1�sw�Y���y�xY�w)Nr>���r���r ���r?���rA���s��� r���� test_open_text_FileNotFoundErrorz*OpenTests.test_open_text_FileNotFoundError>���sC������������+�.>�>�� � � �0� 1��K�K��K�)��2� 1� 1�s����A�AN) r���r���r���r.���r1���r7���r<���rB���rD���r���r���r���r#���r#������s ������6�>�;� � � *r���r#���c�������������������������e�Zd�Zy)� OpenDiskTestsN�r���r���r���r���r���r���rF���rF���D����������r���rF���c�������������������������e�Zd�ZdZy)�OpenDiskNamespaceTests�namespacedata01N�r���r���r����MODULEr���r���r���rJ���rJ���H���������� �Fr���rJ���c�������������������������e�Zd�Zy)�OpenZipTestsNrG���r���r���r���rP���rP���L���rH���r���rP���c�������������������������e�Zd�ZdZy)�OpenNamespaceZipTestsrK���NrL���r���r���r���rR���rR���P���rN���r���rR����__main__)�unittest�importlib_resourcesr �����r����CommonTests�TestCaser���r���r#���� DiskSetuprF���rJ����ZipSetuprP���rR���r����mainr���r���r����<module>r\������s���������'�����(�(�(�*;�*;����d�&�&��(9�(9���+*��+*�\ �I�t�~�~�x�/@�/@�� ��Y�����8I�8I��� �9�d�m�m�X�->�->�� ��I�t�}�}�h�6G�6G�����z���H�M�M�O��r���