§
    T~%j+  ã                   ó@   — d dl Zd dlmc mZ d dlmZmZm	Z	 d„ Z
d„ ZdS )é    N)ÚLocalOrderRecordÚReconcilerSnapshotÚreconcile_hyperliquid_statec            	      óð  — t          dddiig t          ddd¬¦  «        g¬¦  «        } t          | ¦  «        }|j        }d}||u }|sªt	          j        d	|fd
||f¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndt	          j	        |¦  «        t	          j	        |¦  «        dœz  }dd|iz  }t          t	          j        |¦  «        ¦  «        ‚d x}x}}|j        }d}||k    }|sªt	          j        d|fd||f¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndt	          j	        |¦  «        t	          j	        |¦  «        dœz  }dd|iz  }t          t	          j        |¦  «        ¦  «        ‚d x}x}}d}|j        }||v }|sªt	          j        d|fd||f¦  «        t	          j	        |¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndt	          j	        |¦  «        dœz  }dd|iz  }t          t	          j        |¦  «        ¦  «        ‚d x}x}}d S )NÚBTCÚsziú0.01úentry-1Úentry©ÚcoinÚclient_order_idÚ
order_role©Ú	positionsÚopen_ordersÚlocal_ordersF©Úis©z;%(py2)s
{%(py2)s = %(py0)s.new_entries_allowed
} is %(py5)sÚresult©Úpy0Úpy2Úpy5úassert %(py7)sÚpy7é   ©ú==©z;%(py2)s
{%(py2)s = %(py0)s.stops_missing_count
} == %(py5)szposition_without_stop:BTC)Úin)z.%(py1)s in %(py5)s
{%(py5)s = %(py3)s.alerts
})Úpy1Úpy3r   )r   r   r   Únew_entries_allowedÚ
@pytest_arÚ_call_reprcompareÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ	_safereprÚAssertionErrorÚ_format_explanationÚstops_missing_countÚalerts)	Úsnapshotr   Ú@py_assert1Ú@py_assert4Ú@py_assert3Ú@py_format6Ú@py_format8Ú@py_assert0Ú@py_assert2s	            úK/home/agent/projects/CryptoTradingBot/Crypto_Agent/tests/test_reconciler.pyÚ7test_reconciler_flags_position_without_reduce_only_stopr9      sò  € Ý!Ø˜5 &˜/Ð*ØÝ&¨EÀ9ÐY`ÐaÑaÔaÐbðñ ô €Hõ )¨Ñ2Ô2€FàÔ%Ð.¨Ð.Ð%¨Ð.Ð.Ð.Ð.Õ.Ô.Ð.Ð.Ð.Ð.Ð%¨Ð.Ñ.Ô.Ð.Õ.Ô.Ñ.Ô.Ð.Ð.Õ.Ô.ˆ6Ñ.Ô.Ð.Õ.Ô.ˆ6Ñ.Ô.Ð.Ð.Õ.Ô.Ð%Ñ.Ô.Õ.Ô.¨Ñ.Ô.Ð.Ð.Ñ.Ð.Ð.Ð.Ð.Ð.Ñ.Ð.Õ.Õ.Ô.Ð.Ñ.Ô.Ñ.Ô.Ð.Ð.Ð.Ð.Ð.Ð.Ð.ØÔ%Ð*¨Ð*Ð%¨Ò*Ð*Ð*Ð*Õ*Ô*Ð*Ð*Ð*Ð*Ð%¨Ð*Ñ*Ô*Ð*Õ*Ô*Ñ*Ô*Ð*Ð*Õ*Ô*ˆ6Ñ*Ô*Ð*Õ*Ô*ˆ6Ñ*Ô*Ð*Ð*Õ*Ô*Ð%Ñ*Ô*Õ*Ô*¨Ñ*Ô*Ð*Ð*Ñ*Ð*Ð*Ð*Ð*Ð*Ñ*Ð*Õ*Õ*Ô*Ð*Ñ*Ô*Ñ*Ô*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ø&Ð7¨&¬-Ð7Ð&¨-Ð7Ð7Ð7Ð7Õ7Ô7Ð7Ð7Ð7Ð7Ð&¨-Ð7Ñ7Ô7Õ7Ô7Ð&Ñ7Ô7Ð7Õ7Ô7Ñ7Ô7Ð7Ð7Õ7Ô7¨&Ñ7Ô7Ð7Õ7Ô7¨&Ñ7Ô7Ð7Ð7Õ7Ô7¨-Ñ7Ô7Ð7Ð7Ñ7Ð7Ð7Ð7Ð7Ð7Ñ7Ð7Õ7Õ7Ô7Ð7Ñ7Ô7Ñ7Ô7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7ó    c            	      ó|  — t          dddiiddddœgt          ddd¬	¦  «        g¬
¦  «        } t          | ¦  «        }|j        }d}||u }|sªt	          j        d|fd||f¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndt	          j	        |¦  «        t	          j	        |¦  «        dœz  }dd|iz  }t          t	          j        |¦  «        ¦  «        ‚d x}x}}|j        }d}||k    }|sªt	          j        d|fd||f¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndt	          j	        |¦  «        t	          j	        |¦  «        dœz  }dd|iz  }t          t	          j        |¦  «        ¦  «        ‚d x}x}}d S )Nr   r   r	   TÚtrigger)r   Ú
reduceOnlyÚ	orderTyper
   r   r   r   r   r   r   r   r   r   r   r   r!   )r   r   r   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   )r0   r   r1   r2   r3   r4   r5   s          r8   Ú6test_reconciler_accepts_position_with_reduce_only_stopr?      s  € Ý!Ø˜5 &˜/Ð*Ø#°4ÀiÐPÐPÐQÝ&¨EÀ9ÐY`ÐaÑaÔaÐbðñ ô €Hõ )¨Ñ2Ô2€FàÔ%Ð-¨Ð-Ð%¨Ð-Ð-Ð-Ð-Õ-Ô-Ð-Ð-Ð-Ð-Ð%¨Ð-Ñ-Ô-Ð-Õ-Ô-Ñ-Ô-Ð-Ð-Õ-Ô-ˆ6Ñ-Ô-Ð-Õ-Ô-ˆ6Ñ-Ô-Ð-Ð-Õ-Ô-Ð%Ñ-Ô-Õ-Ô-¨Ñ-Ô-Ð-Ð-Ñ-Ð-Ð-Ð-Ð-Ð-Ñ-Ð-Õ-Õ-Ô-Ð-Ñ-Ô-Ñ-Ô-Ð-Ð-Ð-Ð-Ð-Ð-Ð-ØÔ%Ð*¨Ð*Ð%¨Ò*Ð*Ð*Ð*Õ*Ô*Ð*Ð*Ð*Ð*Ð%¨Ð*Ñ*Ô*Ð*Õ*Ô*Ñ*Ô*Ð*Ð*Õ*Ô*ˆ6Ñ*Ô*Ð*Õ*Ô*ˆ6Ñ*Ô*Ð*Ð*Õ*Ô*Ð%Ñ*Ô*Õ*Ô*¨Ñ*Ô*Ð*Ð*Ñ*Ð*Ð*Ð*Ð*Ð*Ñ*Ð*Õ*Õ*Ô*Ð*Ñ*Ô*Ñ*Ô*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ð*r:   )Úbuiltinsr(   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter&   Ú)src.reconciliation.hyperliquid_reconcilerr   r   r   r9   r?   © r:   r8   ú<module>rF      sf   ðØ  € € € € € € € € € € € € Ð wÐ wÐ wÐ wÐ wÐ wÐ wÐ wÐ wÐ wð8ð 8ð 8ð
+ð 
+ð 
+ð 
+ð 
+r:   