Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_ntpath.cpython-311.opt-1.pyc |
�
�KeY� � � � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZmZ d dl m
Z
d dlmZ d dl
mZ d dlZn
# e$ r dZY nw xY w e j dZn
# e$ r dZY nw xY w d dlZdZd � Zn
# e$ r dZY nw xY wd
� Zd� Z G d� d
ej � � Z G d� de� � Z G d� dej ej � � Z G d� de� � Zedk r ej � � dS dS )� N)� os_helper)�
TestFailed�
is_emscripten)�FakePath)�test_genericpath)�
TemporaryFileTFc � � t j dd�� � j }t j t j t j g|_ t j |_ || d d� � }|s3t d� t j � � � � � � �t j
|� � } || ||� � }|d |� S )N�kernel32T)�use_last_errorr z&failed to get short path name 0x{:08X})�ctypes�WinDLL�GetShortPathNameW� c_wchar_p�c_uint32�argtypes�restype�OSError�format�get_last_error�create_unicode_buffer)�path�GSPN�
result_len�results �:/usr/local/apps/python3/lib/python3.11/test/test_ntpath.py�_getshortpathnamer ! s� � ��}�Z��=�=�=�O���)�6�+;�V�_�M��
������T�$��a�(�(�
�� <��B�!�6�&�"7�"9�"9�:�:�<� <�
<��-�j�9�9���T�$��
�3�3�
��k�z�k�"�"� c �� � t | t t t j f� � r&t j t j | � � � � S t | d� � rt d� | D � � � � S | S )N�__iter__c 3 �b K � | ]*}t j t j |� � � � V � �+d S �N)�ntpath�normcase�os�fsdecode��.0�ps r � <genexpr>z_norm.<locals>.<genexpr>1 s4 � � � �C�C��V�_�R�[��^�^�4�4�C�C�C�C�C�Cr )
�
isinstance�bytes�strr$ �PathLiker"