o
    g:                     @   s   d dl Z d dlZd dlmZmZ ddlmZ d dlm	Z	 dd Z
e jje
   de
  d	d
Zdd Ze jjG dd dejZdS )    N)assert_array_equalassert_equal   )util)Pathc                  C   sn   t t j} z| d }W n ty   d }Y nw |d d d d }|r+| r+|S | d d d d d S )N   docsourcef2pycode   )r   __file__resolveparents
IndexErroris_dir)r   nprootdocdir r   T/var/www/html/api-tag/env/lib/python3.10/site-packages/numpy/f2py/tests/test_docs.py
get_docdir   s   r   z*Could not find f2py documentation sources(z does not exist))reasonc                  G   s   t  j|  S )N)r   joinpath)argsr   r   r   _path   s   r   c                   @   s:   e Zd ZedededgZdd Zdd Zdd	 Zd
S )TestDocAdvancedzasterisk1.f90zasterisk2.f90zftype.fc                 C   s   | j j}t| d d S )N   123456789A12)modulefoo1r   selffoor   r   r   test_asterisk1$   s   zTestDocAdvanced.test_asterisk1c                 C   s6   | j j}t|dd t|dd t|dd d S )N   s   12   r      s   123456789A123456789B)r   foo2r   r   r   r   r   test_asterisk2(   s   zTestDocAdvanced.test_asterisk2c                 C   s   | j }|  t|jjd d|j_g d|j_t|jjd t|jjtjg dtj	d d|jjd< t|jjtjg dtj	d d S )Nr   r   )r   r#   r   )dtype-   r   )r   r)   r   )
r   r!   r   dataaxr   nparrayfloat32)r    ftyper   r   r   
test_ftype.   s   zTestDocAdvanced.test_ftypeN)__name__
__module____qualname__r   sourcesr"   r'   r1   r   r   r   r   r      s    r   )pytestnumpyr-   numpy.testingr   r    r   pathlibr   r   markskipifr   
pytestmarkr   slowF2PyTestr   r   r   r   r   <module>   s    
