K iz ddlZddlZddlmZGddej ZGddej ZGdd ej Zy) N)utilcpeZdZejddddgZejjdZ y) TestStringtestssrcstringzchar.f90cPtjgddj}|jjj ||j d\}}|tj|k(sJ|j}d|dddf<|tj|k(sJy)N)abcdefc)dtyperAAA) nparrayTmodule char_testchange_stringsshapepytestapproxcopy)selfstringsinpoutexpecteds b/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/numpy/f2py/tests/test_string.py test_charzTestString.test_char s((-S9;;;;((77 W]]1%'SfmmG,,,,<<>AfmmH----N) __name__ __module__ __qualname__rgetpathsourcesrmarkslowr!r"r rrs7t||GUHjABG [[..r"rc>eZdZejddddgZdZy)TestDocStringArgumentsrrr zstring.fctjd}tjd}tjd}tjd}|jj|||||j dk(sJ|j dk(sJ|j dk(sJ|j dk(sJy)Ns123s123sB23sD23)rrrfootobytes)rabrds r test_examplez#TestDocStringArguments.test_examples HHZ  HHZ  HHV  HHV  1a#yy{j(((yy{j(((yy{f$$$yy{f$$$r"N)r#r$r%rr&r'r3r*r"r r,r,s t||GUHjABG %r"r,c^eZdZejddddgZed dZd dZdZ d Z y) TestFixedStringrrr zfixed_string.f90Nc Bt|tjr|j}n t|tr|j }t|t sJ| t|}d}t|t|t|D]}|||d|zzz }|S)zReturn the content of a string buffer as integer value. For example: _sint('1234') -> 4321 _sint('123A') -> 17321 r ) isinstancerndarrayr/strencodebyteslenrangemin)sstartendijs r _sintzTestFixedString._sint*s a $ A 3  A!U### ;a&C uc#s1v./ A 1A A r"c#,K|dvr,dddddddd d d d tjd tjdtjdtjdtjdtjd tjd tjd tjdtjd yw)Nin1123412345r"1s1s1234s12345r*)buffers123)rr9bytes_r)rintents r _get_inputzTestFixedString._get_input>s V HILMIKJLLMNjjRYYs33hhsmhhuohhtnhhvhhvhhwhhx  hhx  sDDc|jD]<}|jj|}|j|d}||k(r7J|y)NrB)rSrtest_in_bytes4rE)rr@rrs r test_intent_inzTestFixedString.test_intent_inUsO" $A **1-Azz!z+H= #! #=  $r"c|jdD]b}|j|d}|jj|}|j|d}||k(sJ||j|dk(rbJy)Ninout)rRrU)rArV)rSrErtest_inout_bytes4)rr@restrXrs r test_intent_inoutz!TestFixedString.test_intent_inout\s}0 2A::aq:)D --a0Azz!z+H= =4::aq:11 11 2r")rNrG) r#r$r%rr&r' staticmethodrErSrYr^r*r"r r5r5's=t||GUH6HIJG&!.$2r"r5) rnumpyrrIrF2PyTestrr,r5r*r"r rbs>  . .%T]]%"=2dmm=2r"