+
    Siz                         R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RIH
t
  ! R R]P                  4      t]P                  R 4       t]P                  t]P                   t]P"                  tR# )z"Utilities for Python Fire's tests.N)mock)core)tracec                   t   a  ] tR t^t o Rt]P                  RR l4       t]P                  RR l4       tRt	V t
R# )BaseTestCasez'Shared test case for Python Fire tests.c           	   #  X  "   \         P                  ! 4       p\         P                  ! 4       p \        P                  P	                  \
        RV4      ;_uu_ 4        \        P                  P	                  \
        RV4      ;_uu_ 4        Rx  RRR4       RRR4       V'       g[   \
        P                  P                  VP                  4       4       \
        P                  P                  VP                  4       4       RY3RY%33 F  w  rgpTP                  4       p	Tf   T	'       d   \        T: RT	: 24      hK6  \        P                  ! Yy\        P                  \        P                  ,          4      '       d   Kx  \        T: RT	: RT: 24      h	  R#   + '       g   i     EL; i  + '       g   i     EL!; i  T'       g\   \
        P                  P                  TP                  4       4       \
        P                  P                  TP                  4       4       i i ; i5i)a  Asserts that the context generates stdout and stderr matching regexps.

Note: If wrapped code raises an exception, stdout and stderr will not be
  checked.

Args:
  stdout: (str) regexp to match against stdout (None will check no stdout)
  stderr: (str) regexp to match against stderr (None will check no stderr)
  capture: (bool, default True) do not bubble up stdout or stderr

Yields:
  Yields to the wrapped context.
stdoutstderrNz: Expected no output. Got: z: Expected z
 to match )ioStringIOr   patchobjectsysr   writegetvaluer	   AssertionErrorresearchDOTALL	MULTILINE)
selfr   r	   capture	stdout_fp	stderr_fpnameregexpfpvalues
   &&&&      M/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/fire/testutils.pyassertOutputMatches BaseTestCase.assertOutputMatches    s}     II/::S(I66ZZsHi88
 9 7 

++-.

++-.&:&:<bkkme	 $e - . .  yy		BLL(@AA $eV 5 6 6< 988 766 

++-.

++-. s[   +H*-G .F.	F	F.G BH**AH* H*F+%	F..F?	9	G A%H''H*c              #    "   V P                  VR7      ;_uu_ 4        V P                  \        P                  4      ;_uu_ 4         Rx   RRR4       RRR4       R#   \        P                   d_   pTP                  T8w  d   \        RTP                  : RT: 24      hT P                  TP                  \        P                  4       h Rp?ii ; i  + '       g   i     L; i  + '       g   i     R# ; i5i)a>  Asserts that a FireExit error is raised in the context.

Allows tests to check that Fire's wrapper around SystemExit is raised
and that a regexp is matched in the output.

Args:
  code: The status code that the FireExit should contain.
  regexp: stdout must match this regex.

Yields:
  Yields to the wrapped context.
)r	   NzIncorrect exit code: z != )	r   assertRaisesr   FireExitcoder   assertIsInstancer   	FireTrace)r   r$   r   excs   &&& r   assertRaisesFireExit!BaseTestCase.assertRaisesFireExitF   s      
	!	!	!	0	0T]]++	
 , 
1	0 }} 	XX "%((D"2 3 3


		5??
;
	 ,+ 
1	0	0sS   C;(C'C	AC'
C;C3ACCC	C$C''C8	2	C; N).*r+   T)r+   )__name__
__module____qualname____firstlineno____doc__
contextlibcontextmanagerr   r(   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s;     /#6 #6J      r   c              #     "   \         P                  ! 4       p\         P                  ! V 4        V x  \         P                  ! V4       R#   \         P                  ! T4       i ; i5i)z>Context manager to mock a directory change and revert on exit.N)osgetcwdchdir)	directorycwdirs   & r   ChangeDirectoryr=   `   s>      ))+%((9
OHHUOBHHUOs   ,A&A A&A##A&)r0   r1   r
   r8   r   r   unittestr   firer   r   TestCaser   r2   r=   mainskipskipIfr*   r6   r   <module>rD      sq    )  	 	 	 
    @8$$ @F   }}}}	r6   