
    Vh[                        d Z ddlmZmZmZmZmZ 	 ddlmZ e ddl
mZ ddlmZmZmZ ddlmZ ddlmZ d	d
lmZmZmZmZmZmZ d	dlmZ d	dlmZ  G d dej>                        Z  G d dej>                        Z! G d dej>                        Z" G d dej>                        Z# G d d      Z$ G d de%      Z& G d dej>                        Z'y# e	$ r dZY w xY w)z+
Test cases for L{twisted.logger._format}.
    )AnyAnyStrDictOptionalcast)tzsetN)Failure)addTZCleanupmktimesetTZ)unittest)SkipTest   )eventAsTextformatEventformatEventAsClassicLogText
formatTimeformatUnformattableEventformatWithCall)LogEvent)LogLevelc                   l    e Zd ZdZdededefdZddZddZ	dd	Z
dd
ZddZddZddZddZddZy)FormattingTestsz5
    Tests for basic event formatting functions.
    	logFormateventreturnc                 d    ||d<   t        |      }| j                  t        |      t               |S )z
        Create a Twisted log event dictionary from C{event} with the given
        C{logFormat} format string, format it with L{formatEvent}, ensure that
        its type is L{str}, and return its result.
        
log_format)r   assertIstypestr)selfr   r   results       O/home/dcms/DCMS/lib/python3.12/site-packages/twisted/logger/test/test_format.pyformatzFormattingTests.format'   s/     (lU#d6lC(    Nc                 `   | j                  d| j                  d             | j                  d| j                  d             | j                  d| j                  dd             | j                  d| j                  ddd	 
             | j                  d| j                  d             | j                  d| j                  d             | j                  dd      }| j                  d|       t        t	        d            }| j                  d|z   dz   | j                  dd             y)ac  
        L{formatEvent} will format an event according to several rules:

            - A string with no formatting instructions will be passed straight
              through.

            - PEP 3101 strings will be formatted using the keys and values of
              the event as named fields.

            - PEP 3101 keys ending with C{()} will be treated as instructions
              to call that key (which ought to be a callable) before
              formatting.

        L{formatEvent} will always return L{str}, and if given bytes, will
        always treat its format string as UTF-8 encoded.
         r&   abcz{x})xzno, yes.z{not_called}, {called()}.noc                       y)Nyes r.   r&   r$   <lambda>z2FormattingTests.test_formatEvent.<locals>.<lambda>I       r&   )
not_calledcalledu   Sánchezs   SánchezUnable to format events   Snchezs   S{a!s}nchez   )azSb'\xe1'nchezSnchezs   S{a!r}nchezN)assertEqualr%   assertInr!   repr)r"   maybeResultxe1s      r$   test_formatEventz FormattingTests.test_formatEvent2   s   " 	T[[-.T[[_-EU ;<KK+]  	
 	t{{3D'EF.M0JKkk.Gk<&4$w- cCi')4;;~;+QRr&   c                 h     G d d      }| j                  d| j                  d |                    y)zq
        L{formatEvent} will format PEP 3101 keys containing C{.}s ending with
        C{()} as methods.
        c                       e Zd ZdefdZy)0FormattingTests.test_formatMethod.<locals>.Worldr   c                      y)Nworldr.   r"   s    r$   wherez6FormattingTests.test_formatMethod.<locals>.World.where[   s    r&   N)__name__
__module____qualname__r!   rD   r.   r&   r$   Worldr@   Z   s    s r&   rH   zhello worldzhello {what.where()})whatN)r8   r%   )r"   rH   s     r$   test_formatMethodz!FormattingTests.test_formatMethodT   s1    	 	 	4;;'=EG;L	
r&   c                 r     G d dt               }| j                  d| j                  d |                    y)zS
        L{formatEvent} will format subscripts of attributes per PEP 3101.
        c                   6    e Zd ZU  edd      Zeeef   ed<   y)>FormattingTests.test_formatAttributeSubscript.<locals>.Examplebarqux)foobazconfigN)rE   rF   rG   dictrR   r   r!   __annotations__r.   r&   r$   ExamplerM   g   s    %)e%?FDcN?r&   rU   zbar quxz+{example.config[foo]} {example.config[baz]})exampleN)objectr8   r%   )r"   rU   s     r$   test_formatAttributeSubscriptz-FormattingTests.test_formatAttributeSubscriptb   s<    
	@f 	@ 	KK=	  	
r&   c                 X    t        dd      }t        |      }| j                  d|       y)z5
        Formatting an event with no format.
           r   )rP   rN   r(   N)rS   r   r8   r"   r   r#   s      r$   test_formatEventNoFormatz(FormattingTests.test_formatEventNoFormatr   s*     "U#V$r&   c                     t        t               dd      }t        |      }| j                  d|       | j                  t	        |      |       y)z:
        Formatting an event with a bogus format.
        rZ   r   )r   rP   rN   zLog format must be strN)rS   rW   r   r9   r:   r[   s      r$   test_formatEventWeirdFormatz+FormattingTests.test_formatEventWeirdFormat{   s?     aQ7U#.7d5k6*r&   c                     t        dd       }t        |      }| j                  d|       | j                  t        |      |       y)zF
        Formatting an event that's just plain out to get us.
        {evil()}c                      ddz  S NrZ   r   r.   r.   r&   r$   r/   z?FormattingTests.test_formatUnformattableEvent.<locals>.<lambda>   s
    Q r&   r   evilr3   N)rS   r   r9   r:   r[   s      r$   test_formatUnformattableEventz-FormattingTests.test_formatUnformattableEvent   s;     
?U#.7d5k6*r&   c           	          dddd t        t        t                     di}t        |      }| j	                  d|       | j	                  d|       | j	                  d|       y	)
zR
        Formatting an unformattable event that has an unformattable key.
        r   r`   rd   c                      ddz  S rb   r.   r.   r&   r$   r/   zSFormattingTests.test_formatUnformattableEventWithUnformattableKey.<locals>.<lambda>   
    AE r&   gurk*MESSAGE LOST: unformattable object logged:Recoverable data:Exception during formatting:N)r   r!   Unformattabler   r9   r[   s      r$   1test_formatUnformattableEventWithUnformattableKeyzAFormattingTests.test_formatUnformattableEventWithUnformattableKey   s\    
 *Mmo&

 U#BFK)624f=r&   c                     t        dd t                     }t        |      }| j                  d|       | j                  d|       | j                  d|       y)T
        Formatting an unformattable event that has an unformattable value.
        r`   c                      ddz  S rb   r.   r.   r&   r$   r/   zUFormattingTests.test_formatUnformattableEventWithUnformattableValue.<locals>.<lambda>   
    Q r&   )r   rd   ri   rj   rk   rl   N)rS   rm   r   r9   r[   s      r$   3test_formatUnformattableEventWithUnformattableValuezCFormattingTests.test_formatUnformattableEventWithUnformattableValue   sR     !

 U#BFK)624f=r&   c                     t        dd d      }t        |t        t        t	                           }| j                  d|       | j                  t        d      dz   t        d      z   |       y)	rp   r`   c                      ddz  S rb   r.   r.   r&   r$   r/   zbFormattingTests.test_formatUnformattableEventWithUnformattableErrorOMGWillItStop.<locals>.<lambda>   rr   r&   okay)r   rd   recoverablerj   rw   z = N)rS   r   r   BaseExceptionrm   r9   r:   r[   s      r$   @test_formatUnformattableEventWithUnformattableErrorOMGWillItStopzPFormattingTests.test_formatUnformattableEventWithUnformattableErrorOMGWillItStop   s^     !
 *%m]_1UVBFKd=)E1DL@&Ir&   r   N)rE   rF   rG   __doc__r   rW   r!   r%   r=   rJ   rX   r\   r^   re   rn   rs   ry   r.   r&   r$   r   r   "   sQ    	 	 	C 	 SD

 %++>>Jr&   r   c                   @    e Zd ZdZd	dZd	dZd	dZd	dZd	dZd	dZ	y)
TimeFormattingTestsz.
    Tests for time formatting functions.
    Nc                     t        |        y )N)r
   rC   s    r$   setUpzTimeFormattingTests.setUp   s
    Tr&   c                      t         t        d      dt        dt        t           dt        ddf fd} |ddd	        |d
dd        |ddd        |ddd       y)z
        Default time stamp format is RFC 3339 and offset respects the timezone
        as set by the standard C{TZ} environment variable and L{tzset} API.
        N:Platform cannot change timezone; unable to verify offsets.nameexpectedDSTexpectedSTDr   c                     t        |        t        d      }j                  t        |      |       |r't        d      }j                  t        |      |       y y )N)	i  rZ      r   r   r   r   r   r   )	i        r   r   r         rZ   )r   r   r8   r   )r   r   r   localSTDlocalDSTr"   s        r$   testForTimeZonezMTimeFormattingTests.test_formatTimeWithDefaultFormat.<locals>.testForTimeZone   sT     $K>?HZ1;?!"CD  H!5{C r&   UTC+00z2007-01-31T00:00:00+0000zEST+05EDT,M4.1.0,M10.5.0z2006-06-30T00:00:00-0400z2007-01-31T00:00:00-0500zCEST-01CEDT,M4.1.0,M10.5.0z2006-06-30T00:00:00+0200z2007-01-31T00:00:00+0100zCST+06z2007-01-31T00:00:00-0600)r   r   r!   r   )r"   r   s   ` r$    test_formatTimeWithDefaultFormatz4TimeFormattingTests.test_formatTimeWithDefaultFormat   s    
 =WXX
	D
	D$,SM
	D@C
	D
	D 	&	
 	&&&	
 	(&&	
 	&	
r&   c                 t    | j                  t        d      d       | j                  t        dd      d       y)zL
        If C{when} argument is L{None}, we get the default output.
        N-!)defaultr8   r   rC   s    r$   test_formatTimeWithNoTimez-TimeFormattingTests.test_formatTimeWithNoTime   s0     	D)3/D#6<r&   c                     t        d      }| j                  t        |d      d       | j                  t        |dd      d       y)zR
        If C{timeFormat} argument is L{None}, we get the default output.
        	i  	         (   /   rZ   i  N
timeFormatr   r   )r   r   r   r8   r   r"   ts     r$   test_formatTimeWithNoFormatz/TimeFormattingTests.test_formatTimeWithNoFormat   s?     89A$7=A$DcJr&   c                 T    t        d      }| j                  t        |d      d       y)z2
        Alternate time format in output.
        r   z%Y/%Wr   z2013/38Nr   r   s     r$   &test_formatTimeWithAlternateTimeFormatz:TimeFormattingTests.test_formatTimeWithAlternateTimeFormat  s&     89A':IFr&   c                 >    | j                  t        dd      d       y)z0
        "%f" supported in time format.
        g?x.Az%fr   234560Nr   rC   s    r$   test_formatTimePercentFz+TimeFormattingTests.test_formatTimePercentF  s     	MdCXNr&   rz   )
rE   rF   rG   r{   r   r   r   r   r   r   r.   r&   r$   r}   r}      s)    .
`=KGOr&   r}   c                   h    e Zd ZdZddZddZddZddZddZddZ	dd	Z
dd
ZddZddZddZy)ClassicLogFormattingTestsz@
    Tests for classic text log event formatting functions.
    Nc                     t         t        d      t        |        t        d       t	        d      }t        d|      }| j                  t        |      d       y)z
        Time is first field.  Default time stamp format is RFC 3339 and offset
        respects the timezone as set by the standard C{TZ} environment variable
        and L{tzset} API.
        Nr   r   r   XYZZYr   log_timez%2013-09-24T11:40:47+0000 [-#-] XYZZY
)r   r   r
   r   r   rS   r8   r   )r"   r   r   s      r$   test_formatTimeDefaultz0ClassicLogFormattingTests.test_formatTimeDefault  sT     =WXXTh89!4'.7	
r&   c                     dt         t           dt        fd}t        dd      }| j	                  t        ||      d       y	)
zc
        Time is first field.  Custom formatting function is an optional
        argument.
        r   r   c                     d|  dS )N__r.   )r   s    r$   r   zCClassicLogFormattingTests.test_formatTimeCustom.<locals>.formatTime-  s    s":r&   r   i90  r   )r   z__12345__ [-#-] XYZZY
N)r   floatr!   rS   r8   r   )r"   r   r   s      r$   test_formatTimeCustomz/ClassicLogFormattingTests.test_formatTimeCustom'  sB    	(5/ 	c 	 %8'*E(	
r&   c                 T    t        dd      }| j                  t        |      d       y)z:
        Namespace is first part of second field.
        r   my.namespace)r   log_namespacez- [my.namespace#-] XYZZY
NrS   r8   r   r"   r   s     r$   test_formatNamespacez.ClassicLogFormattingTests.test_formatNamespace6  s)     ~F'.+	
r&   c                 p    t        dt        j                        }| j                  t	        |      d       y)z7
        Level is second part of second field.
        r   )r   	log_levelz- [-#warn] XYZZY
NrS   r   warnr8   r   r   s     r$   test_formatLevelz*ClassicLogFormattingTests.test_formatLevel@  s-     8==A'.#	
r&   c                 T    t        dd      }| j                  t        |      d       y)z)
        System is second field.
        r   S.Y.S.T.E.M.r   
log_system- [S.Y.S.T.E.M.] XYZZY
Nr   r   s     r$   test_formatSystemz+ClassicLogFormattingTests.test_formatSystemJ  s)     NC'.&	
r&   c                 t    t        ddt        j                  d      }| j                  t	        |      d       y)B
        System is not supplanted by namespace and level.
        r   r   r   )r   r   r   r   r   Nr   r   s     r$   test_formatSystemRulzz/ClassicLogFormattingTests.test_formatSystemRulzT  s9     (mm%	
 	'.&	
r&   c                 d    t        dt                     }| j                  t        |      d       y)r   r   r   z- [UNFORMATTABLE] XYZZY
N)rS   rm   r8   r   r   s     r$   test_formatSystemUnformattablez8ClassicLogFormattingTests.test_formatSystemUnformattablec  s+     MOD'.'	
r&   c                 T    t        dd      }| j                  t        |      d       y)z0
        Formatted event is last field.
        zid:{id}123r   idz- [-#-] id:123
Nr   r   s     r$   test_formatFormatz+ClassicLogFormattingTests.test_formatFormatm  s)     	e4'.!	
r&   c                 R    t        d      }| j                  t        |      d       y)z#
        No format string.
        r   )r   NrS   r   r   r   s     r$   test_formatNoFormatz-ClassicLogFormattingTests.test_formatNoFormatw  s!     1%8$?r&   c                 T    t        dd      }| j                  t        |      d       y)z&
        Empty format string.
        r(   r   r   Nr   r   s     r$   test_formatEmptyFormatz0ClassicLogFormattingTests.test_formatEmptyFormat~  s$     u-1%8$?r&   c                 R    t        d      }| j                  t        |      d       y)zO
        If the formatted event has newlines, indent additional lines.
        z"XYZZY
A hollow voice says:
"Plugh")r   z-- [-#-] XYZZY
	A hollow voice says:
	"Plugh"
Nr   r   s     r$   test_formatFormatMultiLinez4ClassicLogFormattingTests.test_formatFormatMultiLine  s(      FG'.C	
r&   rz   )rE   rF   rG   r{   r   r   r   r   r   r   r   r   r   r   r   r.   r&   r$   r   r     s@    
&






@@
r&   r   c                       e Zd ZdZddZy)FormatFieldTestsz+
    Tests for format field functions.
    Nc           	          | j                  t        dt        dd             d       | j                  t        dt        d             d	       y
)z
        L{formatWithCall} is an extended version of L{str.format} that
        will interpret a set of parentheses "C{()}" at the end of a format key
        to mean that the format key ought to be I{called} rather than
        stringified.
        zHello, {world}. {callme()}.earthc                       y)Nmayber.   r.   r&   r$   r/   z6FormatFieldTests.test_formatWithCall.<locals>.<lambda>  r0   r&   )rB   callmezHello, earth. maybe.zHello, {repr()!r}.c                       y)Nr:   r.   r.   r&   r$   r/   z6FormatFieldTests.test_formatWithCall.<locals>.<lambda>  r0   r&   )r:   zHello, 'repr'.N)r8   r   rS   rC   s    r$   test_formatWithCallz$FormatFieldTests.test_formatWithCall  sO     	-7?; #	
 	/>1JK	
r&   rz   )rE   rF   rG   r{   r   r.   r&   r$   r   r     s    
r&   r   c                       e Zd ZdZdefdZy)rm   z>
    An object that raises an exception from C{__repr__}.
    r   c                     t        ddz        S rb   )r!   rC   s    r$   __repr__zUnformattable.__repr__  s    1q5zr&   N)rE   rF   rG   r{   r!   r   r.   r&   r$   rm   rm     s    # r&   rm   c                       e Zd ZdZy)CapturedErrorz3
    A captured error for use in format tests.
    N)rE   rF   rG   r{   r.   r&   r$   r   r     s    r&   r   c                       e Zd ZdZddZddZddZddZddZddZ	dd	Z
dd
ZddZddZddZddZddZddZy)EventAsTextTestszi
    Tests for L{eventAsText}, all of which ensure that the
    returned type is UTF-8 decoded text.
    Nc                     	 t        d      # t         $ r t               }Y nw xY wddi}||d<   t        |dd      }| j                  t	        |j                               |       | j                  d|       y)	zT
        An event with a C{log_failure} key will have a traceback appended.
        This is a fake errorr   This is a test log messagelog_failureTFincludeTimestampincludeSystemNr   r	   r   r9   r!   getTracebackr"   fr   	eventTexts       r$   test_eventWithTracebackz(EventAsTextTests.test_eventWithTraceback  sw    	 677 		A	 ()EF mER	c!..*+Y72I>    ##c                     	 t        d      # t         $ r t               }Y nw xY wddi}||d<   t        |dd      }| j                  t	        |j                               |       | j                  d|       y)	zu
        An event with an empty C{log_format} key appends a traceback from
        the accompanying failure.
        r   r   r(   r   TFr   Nr   r   s       r$   "test_formatEmptyEventWithTracebackz3EventAsTextTests.test_formatEmptyEventWithTraceback  st    
	 677 		A	', mER	c!..*+Y7,i8r   c                 "   	 t        d      # t         $ r t               }Y nw xY wdd d}||d<   t        |dd      }| j                  |t               | j                  t	        |j                               |       | j                  d|       y	)
zw
        An event with an unformattable value in the C{log_format} key still
        has a traceback appended.
        r   r`   c                      ddz  S rb   r.   r.   r&   r$   r/   zHEventAsTextTests.test_formatUnformattableWithTraceback.<locals>.<lambda>  rh   r&   rc   r   TFr   N)r   r	   r   assertIsInstancer!   r9   r   r   s       r$   %test_formatUnformattableWithTracebackz6EventAsTextTests.test_formatUnformattableWithTraceback  s    
	 677 		A	 %!
  !mER	i-c!..*+Y7,i8r   c           	      x   	 t        d      # t         $ r t               }Y nw xY wdddd t        t        t	                     di}||d<   t        |dd	
      }| j                  |t               | j                  d|       | j                  t        |j                               |       | j                  d|       y)z
        An event with an unformattable value in the C{log_format} key, that
        throws an exception when __repr__ is invoked still has a traceback
        appended.
        r   r   r`   rd   c                      ddz  S rb   r.   r.   r&   r$   r/   zMEventAsTextTests.test_formatUnformattableErrorWithTraceback.<locals>.<lambda>  rh   r&   ri   r   TFr   zMESSAGE LOSTN)	r   r	   r   r!   rm   r   r   r9   r   r   s       r$   *test_formatUnformattableErrorWithTracebackz;EventAsTextTests.test_formatUnformattableErrorWithTraceback  s    	 677 		A	 *Mmo&

  !mER	i-ni0c!..*+Y7,i8r   c                     ddi}t               |d<   t        |dd      }| j                  |t               | j	                  d|       y)	zk
        If a traceback cannot be appended, a message indicating this is true
        is appended.
        r   r(   r   TFr   z'(UNABLE TO OBTAIN TRACEBACK FROM EVENT)N)rW   r   r   r!   r9   r"   r   r   s      r$   &test_formatEventUnformattableTracebackz7EventAsTextTests.test_formatEventUnformattableTraceback  sG    
 (,%xmER	i-?Kr&   c                 x    ddi}t        |dd      }| j                  |t               | j                  d|       y)zY
        An event with no C{log_failure} key will not have a traceback appended.
        r   r   TFr   N)r   r   r!   r9   r   s      r$   test_formatEventNonCriticalz,EventAsTextTests.test_formatEventNonCritical  s<     ()EFER	i-2I>r&   c                     	 t        d      # t         $ r t               }Y nw xY wddi}||d<   t        |dd      }| j                  d|       | j                  d|       y	)
zU
        An exception message with multibyte characters is properly handled.
        u   €r   r   r   TFr   	TracebackNr   r	   r   r9   r   s       r$   test_formatTracebackMultibytez.EventAsTextTests.test_formatTracebackMultibyte  si    	&& 		A	 ()EF mER	eY'k9-r   c                     	 t        d      # t         $ r t               }Y nw xY wddi}||d<   t        |dd      }| j                  d|       | j                  d	|       y
)zj
        An error raised attempting to decode the UTF still produces a
        valid log message.
        s
   t e s t r   r   r   TFr   r  z.CapturedError(b"\xff\xfet\x00e\x00s\x00t\x00")Nr  r   s       r$   ,test_formatTracebackHandlesUTF8DecodeFailurez=EventAsTextTests.test_formatTracebackHandlesUTF8DecodeFailure*  sk    
	 ?@@ 		A	 ()EF mER	k9-GSr   c                     	 t        d      # t         $ r t               }Y nw xY wt        d      }dd|d}||d<   t        |ddd	      }| j	                  |d
       y)zq
        If includeSystem is specified as the only option no timestamp or
        traceback are printed.
        r   r   ABCDfake_systemr   r   r   r   FTr   includeTracebackr   z[fake_system] ABCDNr   r	   r   r   r8   r"   r   r   r   r   s        r$   test_eventAsTextSystemOnlyz+EventAsTextTests.test_eventAsTextSystemOnly;  s~    
	 677 		A	 89 '

  !m""	
	 	 	
r   c                 
   t         t        d      t        |        t        d       	 t	        d      # t        $ r t               }Y nw xY wt        d      }dd|d}||d	<   t        |d
dd      }| j                  |d       y)zq
        If includeTimestamp is specified as the only option no system or
        traceback are printed.
        Nr   r   r   r   r
  r  r  r   TFr  z2013-09-24T11:40:47+0000 ABCD)	r   r   r
   r   r   r	   r   r   r8   r  s        r$   test_eventAsTextTimestampOnlyz.EventAsTextTests.test_eventAsTextTimestampOnlyW  s    
 =WXXTh	 677 		A	 89 '

  !m!"	
	 	+	
s   4 A
	A
c                     	 t        d      # t         $ r t               }Y nw xY wt        d      }d|d}||d<   t        |ddd      }| j	                  |d	       y
)z\
        If includeSystem is specified with a missing system [-#-]
        is used.
        r   r   r
  r   r   FTr  z
[-#-] ABCDNr  r  s        r$   test_eventAsTextSystemMissingz.EventAsTextTests.test_eventAsTextSystemMissingy  s{    
	 677 		A	 89 
  !m""	
	 		
r   c                     	 t        d      # t         $ r t               }Y nw xY wt        d      }d|t        j                  dd}||d<   t        |ddd	      }| j                  |d
       y)z
        If includeSystem is specified with a missing system but
        namespace and level are present they are used.
        r   r   r
  test)r   r   r   r   r   FTr  z[test#info] ABCDNr   r	   r   r   infor   r8   r  s        r$   .test_eventAsTextSystemMissingNamespaceAndLevelz?EventAsTextTests.test_eventAsTextSystemMissingNamespaceAndLevel  s    
	 677 		A	 89 !#	
  !m""	
	 	!	
r   c                     	 t        d      # t         $ r t               }Y nw xY wt        d      }d|t        j                  d}||d<   t        |ddd      }| j                  |d	       y
)zv
        If includeSystem is specified with a missing system but
        level is present, level is included.
        r   r   r
  )r   r   r   r   FTr  z[-#info] ABCDNr  r  s        r$   &test_eventAsTextSystemMissingLevelOnlyz7EventAsTextTests.test_eventAsTextSystemMissingLevelOnly  s    
	 677 		A	 89 !

  !m""	
	 		
r   c                    dt         dt        dt         fd}| j                  t        t               |dt                     | j                  t        t               |dt                     | j                  d |dt                      y	)
zX
        C{eventAsText} can handle formats that have classes or types as input.
        r   r   r   c                 (    t        d| i|ddd      S )Nr   Fr  )r   )r   r   s     r$   getTextz=EventAsTextTests.test_eventAsTextTypeAsInput.<locals>.getText  s%    y2E2!&!&#	 r&   z{c})cr!   z{c.__name__}N)r!   r   r8   intRuntimeError)r"   r  s     r$   test_eventAsTextTypeAsInputz,EventAsTextTests.test_eventAsTextTypeAsInput  sl    
	s 	S 	S 	 	S75C#89\*GE\,JK# >?r&   rz   )rE   rF   rG   r{   r   r   r   r   r   r  r  r  r  r  r  r  r  r#  r.   r&   r$   r   r     sQ    
?99(9.	L?.T"
8 
D
6
:
8@r&   r   )(r{   typingr   r   r   r   r   timer   ImportErrortwisted.python.failurer	   !twisted.python.test.test_tzhelperr
   r   r   twisted.trialr   twisted.trial.unittestr   _formatr   r   r   r   r   r   _interfacesr   _levelsr   TestCaser   r}   r   r   rm   	Exceptionr   r   r.   r&   r$   <module>r0     s    5 4 
 + I I " +  # UJh'' UJpRO(++ ROj~
 1 1 ~
B
x(( 
2 I d@x(( d@S  Es   C CC