a ;jgR@sddlZddlZddlmZmZddlmZddlm Z ddZ ej j e de d d Zd d Zej jGd ddejZdS)N)assert_array_equal assert_equal)util)PathcCsnttj}z |d}Wnty0d}Yn0|dddd}|rV|rV|S|dddddS)NdocsourceZf2pycode)r__file__resolveparents IndexErroris_dir)rZnprootZdocdirrD/usr/local/lib/python3.9/site-packages/numpy/f2py/tests/test_docs.py get_docdirs    rz*Could not find f2py documentation sources(z does not exist))reasoncGs tj|S)N)rjoinpath)argsrrr_pathsrc@s:eZdZedededgZddZddZdd Zd S) TestDocAdvancedz asterisk1.f90z asterisk2.f90zftype.fcCst|jd}t|ddS)NZfoo1 123456789A12getattrmodulerselffoorrrtest_asterisk1$s zTestDocAdvanced.test_asterisk1cCs:t|jd}t|ddt|ddt|dddS)NZfoo2s12 rs123456789A123456789Brrrrrtest_asterisk2(s zTestDocAdvanced.test_asterisk2cCs|j}|t|jjdd|j_gd|j_t|jjdt|jjtjgdtj dd|jjd<t|jjtjgdtj ddS)Nrr )rr!r )Zdtype-r)rr%r ) rrrdataaxrnparrayZfloat32)rZftyperrr test_ftype.s  zTestDocAdvanced.test_ftypeN)__name__ __module__ __qualname__rsourcesr r$r+rrrrrs  r)Zpytestnumpyr)Z numpy.testingrrrpathlibrrmarkZskipifrZ pytestmarkrZslowZF2PyTestrrrrrs