o
    Z2h$                     @   s   d dl mZmZmZ d dlZd dlmZmZmZm	Z	m
Z
 d dlmZmZmZ dd ZG dd dZG d	d
 d
ZG dd dZG dd dZejjedddd ZdS )    )joinsepdirnameN)
appendpath
minrelpathgpathsget_shared_lib_extensionget_info)assert_assert_equalIS_EDITABLEc                  G   s   t tf|   S )N)r   r   )paths r   u/home/skpark/git/infrasmart_work/infrasmart/venv/lib/python3.10/site-packages/numpy/distutils/tests/test_misc_util.py<lambda>   s    r   c                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestAppendpathc                 C   s\   t tddtdd t tddtdd t tddtdd t tddtdd d S )Nprefixnamez/prefixz/namer   r   r   ajoinselfr   r   r   test_1   s   zTestAppendpath.test_1c                 C   sN   t tddtddd t tddtdddd t tddtddd d S )	Nz
prefix/subr   r   subzsup/namesup/prefix/subz/prefix/namer   r   r   r   r   test_2   s   




zTestAppendpath.test_2c              	   C   sX   t tddtdddd t tddtddd	dd
d t tddtddd	dd d S )Nr   z/prefix/sup/namer   r   r   r   z/prefix/sub/sub2z/prefix/sup/sup2/namesub2sup2z/prefix/sub/sup/name)r   r   r   r   r   r   r   test_3   s   


zTestAppendpath.test_3N)__name__
__module____qualname__r   r   r   r   r   r   r   r      s    r   c                   @      e Zd Zdd ZdS )TestMinrelpathc                 C   s   dd }t t|d|d t tdd t t|dd t t|dd t t|d	d
 t t|dd t t|d|d t t|d|d t t|d|d d S )Nc                 S   s   |  dtS )N/)replacer   )pathr   r   r   r   )   s    z'TestMinrelpath.test_1.<locals>.<lambda>zaa/bb..zaa/.. zaa/../bbbbzaa/bb/..aazaa/bb/../..zaa/bb/../cc/../ddzaa/ddz.././..z../..zaa/bb/.././../dddd)r   r   )r   nr   r   r   r   (   s   zTestMinrelpath.test_1N)r    r!   r"   r   r   r   r   r   r$   &       r$   c                   @   r#   )
TestGpathsc                 C   s`   t tttd}td|}tt|dd|v t| td|}tt|d|d kt| d S )Nr(   zcommand/*.pycommandzbuild_src.pyzsystem_info.pyr   )r   r   r   __file__r   r
   repr)r   
local_pathlsfr   r   r   test_gpaths6   s
   

 zTestGpaths.test_gpathsN)r    r!   r"   r6   r   r   r   r   r/   4   r.   r/   c                   @   r#   )TestSharedExtensionc                 C   s   dd l }tdd}|jdrt|d n#|jdr!t|d n|jdr-t|d n|jd	r8t|d
 ttdd d S )Nr   F)is_python_extlinuxz.sognukfreebsddarwinz.dylibwinz.dllT)sysr   platform
startswithr   r
   )r   r=   extr   r   r   test_get_shared_lib_extension?   s   

z1TestSharedExtension.test_get_shared_lib_extensionN)r    r!   r"   rA   r   r   r   r   r7   =   r.   r7   z@`get_info` .ini lookup method incompatible with editable install)reasonc                  C   s&   t d} t| tsJ d| v sJ d S )Nnpymathdefine_macros)r	   
isinstancedict)infor   r   r   test_installed_npymath_iniN   s   rH   )os.pathr   r   r   pytestnumpy.distutils.misc_utilr   r   r   r   r	   numpy.testingr
   r   r   r   r   r$   r/   r7   markskipifrH   r   r   r   r   <module>   s    	