Your IP : 216.73.216.213
a
XC?hy� � @ sX d dl Z d dlZd dlZd dlZd dlZd dlZd dl mZ d dlmZm Z d dl
mZmZ d dl
mZ zd dlZW n ey� dZY n0 z
e j W n ey� dZY n0 dZzd dlZW n ey� dZY n0 dZdd � Zd
d� Zdd
� Zdd� ZG dd� dej�ZG dd� de�ZG dd� dejej�ZG dd� de�Ze dk�rTe�!� dS )� N)�
ALLOW_MISSING)�
TestFailed�FakePath)�support�test_genericpath)�
TemporaryFileFTc C sn t jddd�j}t jt jt jg|_t j|_|| d d�}|sLtd�t � � ���t �
|�}|| ||�}|d |� S )NZkernel32T)Zuse_last_errorr z&failed to get short path name 0x{:08X})�ctypesZWinDLLZGetShortPathNameWZ c_wchar_pZc_uint32�argtypesZrestype�OSError�formatZget_last_errorZcreate_unicode_buffer)�pathZGSPNZ
result_len�result� r �5/opt/alt/python39/lib64/python3.9/test/test_ntpath.py�_getshortpathname! s �
r c C sB t | tttjf�r"t�t�| ��S t| d�r>t dd� | D ��S | S )N�__iter__c s s | ]}t �t�|��V qd S �N)�ntpath�normcase�os�fsdecode��.0�pr r r � <genexpr>1 � z_norm.<locals>.<genexpr>)
�
isinstance�bytes�strr �PathLiker r r �hasattr�tuple)r r r r �_norm- s
r"