
    Bwg:                        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 Z
e j                  j                   e
       j                          d e
        d	      Zd
 Ze j                  j                    G d dej"                               Zy)    N)assert_array_equalassert_equal   )util)Pathc                      t        t              j                         j                  } 	 | d   }|dz  dz  dz  dz  }|r|j                         r|S | d   dz  dz  dz  dz  S # t        $ r d }Y 2w xY w)N   docsourcef2pycode   )r   __file__resolveparents
IndexErroris_dir)r   nprootdocdirs      Q/var/www/horilla/myenv/lib/python3.12/site-packages/numpy/f2py/tests/test_docs.py
get_docdirr      s    8n$$&..G= %(*V3f<&--/1:(61F::  s   A! !A/.A/z*Could not find f2py documentation sources(z does not exist))reasonc                  0     t               j                  |  S )N)r   joinpath)argss    r   _pathr      s     :<  $''    c                   L    e Zd Z ed       ed       ed      gZd Zd Zd Zy)TestDocAdvancedzasterisk1.f90zasterisk2.f90zftype.fc                 R    | j                   j                  }t         |       d       y )N   123456789A12)modulefoo1r   selffoos     r   test_asterisk1zTestDocAdvanced.test_asterisk1$   s    kkSUO,r   c                     | j                   j                  }t         |d      d       t         |d      d       t         |d      d       y )N   s   12   r!      s   123456789A123456789B)r"   foo2r   r$   s     r   test_asterisk2zTestDocAdvanced.test_asterisk2(   s<    kkSVU#SWo.SW56r   c                 J   | j                   }|j                          t        |j                  j                  d       d|j                  _        g d|j                  _        t        |j                  j                  d       t        |j                  j
                  t        j                  g dt        j                               d|j                  j
                  d<   t        |j                  j
                  t        j                  g dt        j                               y )Nr   r   )r   r)   r   )dtype-   r   )r   r0   r   )
r"   r&   r   dataaxr   nparrayfloat32)r%   ftypes     r   
test_ftypezTestDocAdvanced.test_ftype.   s    		UZZ\\1%

 

UZZ\\1%5::<<88IRZZ@	B

Q5::<<88JbjjA	Cr   N)__name__
__module____qualname__r   sourcesr'   r-   r8    r   r   r   r      s2     _%u_'=Y!G-7Cr   r   )pytestnumpyr4   numpy.testingr   r    r   pathlibr   r   markskipifr   
pytestmarkr   slowF2PyTestr   r=   r   r   <module>rH      s      :  ; [[~%'   
( Cdmm C Cr   