a ;jg@s:ddlZddlZddlZddlmZGdddejZdS)N)utilc @s eZdZeddddeddddeddddeddddeddddedddd gZejjd d Z ejjd d Z ejjddZ ejjddZ ejjddZ ejjddZejjddZejjddZejjddZddZddZd d!Zd"S)#TestParametersZtestssrcZ parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90zconstant_array.f90cCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSNZdtype)rr ) nparangeZfloat32pytestraises ValueErrormoduleZ foo_singleallcloseselfxrI/usr/local/lib/python3.9/site-packages/numpy/f2py/tests/test_parameter.pytest_constant_real_singles  z(TestParameters.test_constant_real_singlecCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSr) r r float64rrrrZ foo_doublerrrrrtest_constant_real_doubles  z(TestParameters.test_constant_real_doublecCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdS)Nrrr r ) rr ) r r int32rrrrZfoo_compound_intrrrrrtest_constant_compound_int*s  z)TestParameters.test_constant_compound_intcCs4tjdtjd}|j|t|gds0JdS)Nr)rr r )r r rrZfoo_non_compound_intrrrrrtest_constant_non_compound_int5s z-TestParameters.test_constant_non_compound_intcCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSr) r r rrrrrZfoo_intrrrrrtest_constant_integer_int<s  z(TestParameters.test_constant_integer_intcCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSr) r r Zint64rrrrZfoo_longrrrrrtest_constant_integer_longGs  z)TestParameters.test_constant_integer_longcCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSNrrr r )r r) r r rrrrrZfoorrrrrtest_constant_bothRs  z!TestParameters.test_constant_bothcCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSr#) r r rrrrrZfoo_norrrrrtest_constant_no]s  zTestParameters.test_constant_nocCs`tjdtjdddd}tt|jj|tjdtjd}|j|t|gds\JdSr#) r r rrrrrZfoo_sumrrrrrtest_constant_sumhs  z TestParameters.test_constant_sumcCsjtjdtjd}tjdtjd}|j||}t|gdsBJt|gdsVJt|dsfJdS)Nr r)g?g?)r)g$@g4@g>@gD@g3@)r r rrZ foo_arrayr)rryzrrrtest_constant_arrayss z"TestParameters.test_constant_arraycCs:tjdtjd}|j|}t||jddds6JdS)Nrr)r r F)order)r r rrZfoo_array_any_indexrZreshape)rrr*rrrtest_constant_array_any_index{s z,TestParameters.test_constant_array_any_indexcCs|j}|dksJdS)N )rZfoo_array_delimsrrrrtest_constant_array_delimss z)TestParameters.test_constant_array_delimsN)__name__ __module__ __qualname__rZgetpathsourcesrmarkZslowrrrr r!r"r%r&r'r,r/r1rrrrr s8          r)osrnumpyr rZF2PyTestrrrrrs