
    .iL                     V   d dl Z d dlZd dlZd dlZd dlmZ ej                  d        Z
ej                  d        Zej                  d        Zej                  j                  ddg dfdg d	fgddg
      d        Zd Zd Zej                  j                  dg d      d        Zd Zy)    Nc                      t        j                  ddgdz  t        j                  gz   ddgz   t        j                  gz   ddgz   d      S )>Fixture returning boolean array with valid and missing values.TF   booleandtype)pdarraynpnan     i/var/www/app/trading-bot/venv/lib/python3.12/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydatar   
   sL     88	uRVVH$e}4x?4-O r   c                  T    t        j                  dgdz  dgdz  z   dgdz  z   d      S )r   T   FNr   r   r	   r
   r   r   r   
left_arrayr      s1     88TFQJ%1,vz9KKr   c                  :    t        j                  g ddz  d      S )r   )TFNr   r   r   r   r   r   r   right_arrayr      s     88'!+9==r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                     t        t        |      } || |      }t        j                  |d      }t	        j
                  ||       y )Nr   r   )getattroperatorr	   r
   tmassert_extension_array_equal)r   r   opnameexpopresultexpecteds          r   test_add_mulr$   #   s<     
6	"B
K(Fxx9-H##FH5r   c                 r    d}t        j                  t        |      5  | |z
   d d d        y # 1 sw Y   y xY w)Nznumpy boolean subtract, the `-` operator, is (?:deprecated|not supported), use the bitwise_xor, the `\^` operator, or the logical_xor function instead\.match)pytestraises	TypeErrorr   r   msgs      r   test_subr-   2   s:    	Y  
y	, ![ ! ! !s   -6c                 P   d}t        j                  t        |      5  t        j                  | j
                        t        j                  |j
                        z   d d d        t        j                  t        |      5  | |z   d d d        y # 1 sw Y   3xY w# 1 sw Y   y xY w)N-operator '.*' not implemented for bool dtypesr&   )r(   r)   NotImplementedErrorr	   Series_datar+   s      r   test_divr3   ;   s    
9C	*#	6 C
		*""#bii0A0A&BBC 
*#	6 ![ ! !	C C! !s   A BBBB%r   )floordivmodpowc                 2   t        t        |      }|dk7  r0d}t        j                  t        |      5   || |      }d d d        y  || |      } || j                  d      |j                  d            }t        j                  ||       y # 1 sw Y   y xY w)Nr5   r/   r&   Int8)r   r   r(   r)   r0   astyper   r   )r   r   r   r!   r,   r"   r#   s          r   test_op_int8r:   E   s     
6	"B=]].c: 	1
K0F	1
K(F*##F+[-?-?-GHH##FH5	1s   
BBc                 X   |}t        j                  |       }t        ||      }d}t        j                  t
        |      5   |d       d d d        dj                  g d      }t        j                  t
        |      5   |t        j                  d             d d d        |dvr_dj                  g d      }t        j                  t
        |      5   |t        j                  d|j                  	             d d d        y y # 1 sw Y   xY w# 1 sw Y   yxY w# 1 sw Y   y xY w)
Na  did not contain a loop with signature matching types|BooleanArray cannot perform the operation|not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''|not supported for dtyper&   foo|)!unsupported operand type\(s\) forz;Concatenation operation is not implemented for NumPy arrayshas no kernelnot supported for dtype20180101)__mul____rmul__)r>   zcan only concatenate strz4not all arguments converted during string formattingr?   znot implementedr@   )index)	r	   r1   r   r(   r)   r*   join	TimestamprD   )r   all_arithmetic_operatorsr!   sopsr,   s         r   test_error_invalid_valuesrJ   ]   s   	!B
		$A
!R.C	"  
y	, E

((	
C 
y	, &BLL$%& 
((hh	
 ]]9C0 	1		%qww/0	1 	1 ) & & 	1 	1s$   	D D(D DD D))r   numpyr   r(   pandasr	   pandas._testing_testingr   fixturer   r   r   markparametrizer$   r-   r3   r:   rJ   r   r   r   <module>rR      s           L L
 > > 	GH	IJ 
  66!! 	6	6 )1r   