§
    D‹%jŸ  ã                   ó<   — d dl Zd dlmc mZ d dlmZmZ d„ Z	d„ Z
dS )é    N)ÚNonceManagerÚSignerLockRegistryc                 óú  — | dz  }t          |d¬¦  «        }|                     ¦   «         }|                     ¦   «         }t          |d¬¦  «        }|                     ¦   «         }||k     }||k     }|r|st          j        d||fd|||f¦  «        dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        nddt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        nddt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndd	œz  }	d
d|	iz  }
t          t          j	        |
¦  «        ¦  «        ‚d x}}d S )Nz
nonce.jsonÚ0xabc)Úsigner)Ú<r   )z%(py0)s < %(py3)sz%(py3)s < %(py4)sÚaÚbÚc)Úpy0Úpy3Úpy4zassert %(py6)sÚpy6)
r   Ú
next_nonceÚ
@pytest_arÚ_call_reprcompareÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ	_safereprÚAssertionErrorÚ_format_explanation)Útmp_pathÚpÚn1r	   r
   Ún2r   Ú@py_assert1Ú@py_assert2Ú@py_format5Ú@py_format7s              úN/home/agent/projects/CryptoTradingBot/Crypto_Agent/tests/test_nonce_manager.pyÚ4test_nonce_manager_persists_monotonic_atomic_counterr"      s“  € Ø<Ñ€AÝ	a Ð	(Ñ	(Ô	(€BØ
Š‰Œ€AØ
Š‰Œ€AÝ	a Ð	(Ñ	(Ô	(€BØ
Š‰Œ€AØˆqŠ9Ðˆq1Š9ÐÐÐÐÑÕÔÐÐÐÐÐˆ1ˆq1ÐÑÔÐÕÔÑÔÐÐÕÔˆ1ÑÔÐÕÔˆ1ÑÔÐÐÐÕÔÑÔÐÐÕÔˆqÑÔÐÕÔˆqÑÔÐÐÐÕÔÑÔÐÐÕÔ1ÑÔÐÕÔ1ÑÔÐÐÐÐÑÐÐÐÐÐÑÐÕÕÔÐÑÔÑÔÐÐÐÐÐÐÐó    c                 óþ  — t          | ¦  «        }|                     dd¬¦  «        }|                     dd¬¦  «        }|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}||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   Úp1)Ú
process_idÚp2T)Úis)z0%(py2)s
{%(py2)s = %(py0)s.acquired
} is %(py5)sÚfirst)r   Úpy2Úpy5zassert %(py7)sÚpy7FÚsecondÚsigner_collision)ú==)z.%(py2)s
{%(py2)s = %(py0)s.reason
} == %(py5)s)r   Útry_acquireÚacquiredr   r   r   r   r   r   r   r   Úreason)	r   Úregr)   r-   r   Ú@py_assert4Ú@py_assert3Ú@py_format6Ú@py_format8s	            r!   Ú&test_signer_registry_detects_collisionr8      sÚ  € Ý
˜XÑ
&Ô
&€CØOŠO˜G°ˆOÑ5Ô5€EØ_Š_˜W°ˆ_Ñ6Ô6€FØŒ>Ð!˜TÐ!ˆ>˜TÐ!Ð!Ð!Ð!Õ!Ô!Ð!Ð!Ð!Ð!ˆ>˜TÐ!Ñ!Ô!Ð!Õ!Ô!Ñ!Ô!Ð!Ð!Õ!Ô!ˆ5Ñ!Ô!Ð!Õ!Ô!ˆ5Ñ!Ô!Ð!Ð!Õ!Ô!ˆ>Ñ!Ô!Õ!Ô!˜TÑ!Ô!Ð!Ð!Ñ!Ð!Ð!Ð!Ð!Ð!Ñ!Ð!Õ!Õ!Ô!Ð!Ñ!Ô!Ñ!Ô!Ð!Ð!Ð!Ð!Ð!Ð!Ð!ØŒ?Ð#˜eÐ#ˆ?˜eÐ#Ð#Ð#Ð#Õ#Ô#Ð#Ð#Ð#Ð#ˆ?˜eÐ#Ñ#Ô#Ð#Õ#Ô#Ñ#Ô#Ð#Ð#Õ#Ô#ˆ6Ñ#Ô#Ð#Õ#Ô#ˆ6Ñ#Ô#Ð#Ð#Õ#Ô#ˆ?Ñ#Ô#Õ#Ô#˜eÑ#Ô#Ð#Ð#Ñ#Ð#Ð#Ð#Ð#Ð#Ñ#Ð#Õ#Õ#Ô#Ð#Ñ#Ô#Ñ#Ô#Ð#Ð#Ð#Ð#Ð#Ð#Ð#ØŒ=Ð.Ð.Ð.ˆ=Ð.Ò.Ð.Ð.Ð.Õ.Ô.Ð.Ð.Ð.Ð.ˆ=Ð.Ð.Ñ.Ô.Ð.Õ.Ô.Ñ.Ô.Ð.Ð.Õ.Ô.ˆ6Ñ.Ô.Ð.Õ.Ô.ˆ6Ñ.Ô.Ð.Ð.Õ.Ô.ˆ=Ñ.Ô.Õ.Ô.Ð.Ñ.Ô.Ð.Ð.Ñ.Ð.Ð.Ð.Ð.Ð.Ñ.Ð.Õ.Õ.Ô.Ð.Ñ.Ô.Ñ.Ô.Ð.Ð.Ð.Ð.Ð.Ð.Ð.Ð.Ð.r#   )Úbuiltinsr   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter   Úsrc.execution.nonce_managerr   r   r"   r8   © r#   r!   ú<module>r?      s`   ðØ  € € € € € € € € € € € € Ð HÐ HÐ HÐ HÐ HÐ HÐ HÐ Hðð ð ð/ð /ð /ð /ð /r#   