
    tf                        d Z ddlZddlZddlmZmZ ddlmZm	Z	m
Z
 ddlmZmZ ddlmZ ddlmZmZmZ ddlmZ dd	lmZ  G d
 de          Z G d d          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ej                  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# ee#j$                  d              Z% ee#j$        d!"          d#             Z& G d$ d%ej                  Z'd& Z(e(Z) ee'j$        d'e*d(           d) Z+dS )*a  
Tests for assertions provided by C{SynchronousTestCase} and C{TestCase},
provided by L{twisted.trial.unittest}.

L{TestFailureTests} demonstrates that L{SynchronousTestCase.fail} works, so that
is the only method on C{twisted.trial.unittest.SynchronousTestCase} that is
initially assumed to work.  The test classes are arranged so that the methods
demonstrated to work earlier in the file are used by those later in the file
(even though the runner will probably not run the tests in this order).
    N)VersiongetVersionString)Deferredfailsucceed)
deprecateddeprecatedModuleAttribute)Failure)accumulateMethodsfullyQualifiedNameprefixedMethods)FancyEqMixin)unittestc                   $    e Zd ZdZd ZdefdZdS )MockEqualitynamec                     || _         d S Nr   )selfr   s     a/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/test/test_assertions.py__init__zMockEquality.__init__$   s    			    returnc                     d| j          dS )NzMockEquality()r   r   s    r   __repr__zMockEquality.__repr__'   s    +ty++++r   N)__name__
__module____qualname__compareAttributesr   strr    r   r   r   r   !   sD        !  ,# , , , , , ,r   r   c                        e Zd ZdZd ZeZeZdS )ComparisonErrorzH
    An object which raises exceptions from its comparison methods.
    c                      t          d          )NzComparison is broken)
ValueError)r   others     r   _errorzComparisonError._error0   s    /000r   N)r   r    r!   __doc__r*   __eq____ne__r$   r   r   r&   r&   +   s3         1 1 1 FFFFr   r&   c                   J    e Zd ZdZ G d dej                  Zd Zd Zd Z	dS )TestFailureTestsa  
    Tests for the most basic functionality of L{SynchronousTestCase}, for
    failing tests.

    This class contains tests to demonstrate that L{SynchronousTestCase.fail}
    can be used to fail a test, and that that failure is reflected in the test
    result object.  This should be sufficient functionality so that further
    tests can be built on L{SynchronousTestCase} instead of
    L{unittest.TestCase}.  This depends on L{unittest.TestCase} working.
    c                       e Zd Zd ZdS )TestFailureTests.FailingTestc                 0    |                      d           d S )NzThis test fails.r   r   s    r   
test_failsz'TestFailureTests.FailingTest.test_failsD   s    II()))))r   N)r   r    r!   r4   r$   r   r   FailingTestr1   C   s#        	* 	* 	* 	* 	*r   r5   c                    t           | j        j         | j        j         g}t          j                    | _        | j                            d                    |                    | _        t          | j                  d         | _
        dS )zo
        Load a suite of one test which can be used to exercise the failure
        handling behavior.
        .r   N)r   	__class__r5   pyunit
TestLoaderloaderloadTestsFromNamejoinsuitelisttest)r   
componentss     r   setUpzTestFailureTests.setUpG   sh    
  79I9RS
'))[22388J3G3GHH
$$Q'			r   c                     	 | j                             d           |                     d           dS # | j         j        $ r.}|                     dt	          |                     Y d}~dS d}~ww xY w)z}
        L{SynchronousTestCase.fail} raises
        L{SynchronousTestCase.failureException} with the given argument.
        failedzRSynchronousTestCase.fail method did not raise SynchronousTestCase.failureExceptionN)r@   r   failureExceptionassertEqualr#   r   results     r   	test_failzTestFailureTests.test_failQ   s    
	INN8$$$ II7     y) 	4 	4 	4Xs6{{333333333	4s   3 A0#A++A0c                    t          j                    }| j                            |           |                     |                                           |                     |j        g            |                     t          |j	                  d           |                     |j	        d         d         | j
                   dS )z
        When a test method raises L{SynchronousTestCase.failureException}, the test is
        marked as having failed on the L{TestResult}.
           r   N)r9   
TestResultr>   runassertFalsewasSuccessfulrF   errorslenfailuresr@   rG   s     r   test_failingExceptionFailsz+TestFailureTests.test_failingExceptionFails`   s    
 "$$
v--//000+++V_--q111+A.	:::::r   N)
r   r    r!   r+   r   SynchronousTestCaser5   rB   rI   rS   r$   r   r   r/   r/   7   sx        	 	* * * * *h2 * * *( ( (  
; 
; 
; 
; 
;r   r/   c                   6    e Zd ZdZd Zd Zd Zd Zd Zd Z	dS )	AssertFalseTestsa  
    Tests for L{SynchronousTestCase}'s C{assertFalse} and C{failIf} assertion
    methods.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you
    are testing a unit testing framework.

    @note: As of 11.2, C{assertFalse} is preferred over C{failIf}.
    c                 v    dddddg fD ]/} ||d|          }||k    r|                      d|           0dS )z
        Perform the positive case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        r           FNr$   
failed on Did not return argument r3   )r   methodnotTruerH   s       r   _assertFalseFalsez"AssertFalseTests._assertFalseFalsex   so     3tR4 	B 	BGVG%='%=%=>>F  		@W@@AAA	B 	Br   c           
         dddddgdfD ]w}	  ||d|           |                      d|j        d|d	           4# | j        $ r7}|                     d|t	          |          d
|d|           Y d}~pd}~ww xY wdS )z
        Perform the negative case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        rK   Tcat         rY   Call to () didn't failRaised incorrect exception on : Nr   r   rE   assertInr#   )r   r[   truees       r   _assertFalseTruez!AssertFalseTests._assertFalseTrue   s     eaVV4 	 	Dt2$22333 			     (   )))FFDTDDqDD       	 	s   >
A?-A::A?c                 :    |                      | j                   dS )zt
        L{SynchronousTestCase.failIf} returns its argument if its argument is
        not considered true.
        N)r]   failIfr   s    r   test_failIfFalsez!AssertFalseTests.test_failIfFalse   s     
 	t{+++++r   c                 :    |                      | j                   dS )zy
        L{SynchronousTestCase.assertFalse} returns its argument if its argument
        is not considered true.
        N)r]   rN   r   s    r   test_assertFalseFalsez&AssertFalseTests.test_assertFalseFalse   s!    
 	t/00000r   c                 :    |                      | j                   dS )z
        L{SynchronousTestCase.failIf} raises
        L{SynchronousTestCase.failureException} if its argument is considered
        true.
        N)rm   ro   r   s    r   test_failIfTruez AssertFalseTests.test_failIfTrue   s      	dk*****r   c                 :    |                      | j                   dS )z
        L{SynchronousTestCase.assertFalse} raises
        L{SynchronousTestCase.failureException} if its argument is considered
        true.
        N)rm   rN   r   s    r   test_assertFalseTruez%AssertFalseTests.test_assertFalseTrue   s!     	d./////r   N)
r   r    r!   r+   r]   rm   rp   rr   rt   rv   r$   r   r   rV   rV   m   s{         	B 	B 	B  0, , ,1 1 1+ + +0 0 0 0 0r   rV   c                   6    e Zd ZdZd Zd Zd Zd Zd Zd Z	dS )	AssertTrueTestsa  
    Tests for L{SynchronousTestCase}'s C{assertTrue} and C{failUnless} assertion
    methods.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you
    are testing a unit testing framework.

    @note: As of 11.2, C{assertTrue} is preferred over C{failUnless}.
    c           
         dddddg fD ]w}	  ||d|           |                      d|j        d|d	           4# | j        $ r7}|                     d|t	          |          d
|d|           Y d}~pd}~ww xY wdS )z
        Perform the negative case test for C{assertTrue} and C{failUnless}.

        @param method: The test method to test.
        r   rX   FNr$   rY   rd   re   rf   rg   rh   ri   )r   r[   r\   rl   s       r   _assertTrueFalsez AssertTrueTests._assertTrueFalse   s     3tR4 	 	Gw 8W 8 8999 			     (   ,,,FFGWGG!GG       	 	s   =
A>-A99A>c                 x    dddddgdfD ]/} ||d|          }||k    r|                      d|           0dS )	z
        Perform the positive case test for C{assertTrue} and C{failUnless}.

        @param method: The test method to test.
        rK   Tr_   r`   ra   rY   rZ   Nr3   )r   r[   rk   rH   s       r   _assertTrueTruezAssertTrueTests._assertTrueTrue   sk     eaVV4 	? 	?DVD"7t"7"788F~~		=T==>>>	? 	?r   c                 :    |                      | j                   dS )z
        L{SynchronousTestCase.assertTrue} raises
        L{SynchronousTestCase.failureException} if its argument is not
        considered true.
        N)rz   
assertTruer   s    r   test_assertTrueFalsez$AssertTrueTests.test_assertTrueFalse         	do.....r   c                 :    |                      | j                   dS )z
        L{SynchronousTestCase.failUnless} raises
        L{SynchronousTestCase.failureException} if its argument is not
        considered true.
        N)rz   
failUnlessr   s    r   test_failUnlessFalsez$AssertTrueTests.test_failUnlessFalse   r   r   c                 :    |                      | j                   dS )zt
        L{SynchronousTestCase.assertTrue} returns its argument if its argument
        is considered true.
        N)r|   r~   r   s    r   test_assertTrueTruez#AssertTrueTests.test_assertTrueTrue        
 	T_-----r   c                 :    |                      | j                   dS )zt
        L{SynchronousTestCase.failUnless} returns its argument if its argument
        is considered true.
        N)r|   r   r   s    r   test_failUnlessTruez#AssertTrueTests.test_failUnlessTrue   r   r   N)
r   r    r!   r+   rz   r|   r   r   r   r   r$   r   r   rx   rx      sx           0	? 	? 	?/ / // / /. . .. . . . .r   rx   c                   8   e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d  Z"d! Z#d" Z$d# Z%d$ Z&d% Z'd& Z(d' Z)d( Z*d) Z+ e,e-j.        d*d+          	d,e+_/        d+S d+S )-SynchronousAssertionsTestsa  
    Tests for L{SynchronousTestCase}'s assertion methods.  That is, failUnless*,
    failIf*, assert* (not covered by other more specific test classes).

    Note: As of 11.2, assertEqual is preferred over the failUnlessEqual(s)
    variants.  Tests have been modified to reflect this preference.

    This is pretty paranoid.  Still, a certain paranoia is healthy if you are
    testing a unit testing framework.
    c                 l    |                      ||          }||k    r|                     d           d S d S )Nz)assertEqual should return first parameter)rF   r   )r   firstsecondxs       r   _testEqualPairz)SynchronousAssertionsTests._testEqualPair  s@    UF++::IIABBBBB :r   c                    d}	 |                      ||           n# | j        $ r}t          j        d          }	 |                     ||           nX# |j        $ rK}d}t	          |          }t	          |          }||k    r|                     d|d|           Y d}~nd}~ww xY wY d}~nd}~ww xY w|s|                     d|d|d	           dS dS )
z
        Assert that when called with unequal arguments, C{assertEqual} raises a
        failure exception with the same message as the standard library
        C{assertEqual} would have raised.
        FrB   Tz
Expected: z; Got: NzCall to assertEqual(, rf   )rF   rE   r9   TestCaser#   r   )	r   r   r   raised
ourFailurecasetheirFailuregotexpecteds	            r   _testUnequalPairz+SynchronousAssertionsTests._testUnequalPair  s8    	GUF++++$ 		G 		G 		G?7++DG  ////( G G G*oo|,,s??IIE8EEcEEFFFG			G  	QIIOUOOOOOPPPPP	Q 	Qs>    
B3B.AB.
B&AB!B.!B&&B..B3c                     |                      dd           |                     dd           |                      dgdg           |                     dgd           d S )Nr_   dogrK   orange)r   r   r   s    r   test_assertEqual_basicz1SynchronousAssertionsTests.test_assertEqual_basic/  sf    E5)))eU+++QC!%%%qc8,,,,,r   c                    t          d          }t          d          }t          d          }|                     ||           |                     ||           |                     ||           |                     ||           d S )Nr   r   )r   r   r   )r   r   yzs       r   test_assertEqual_customz2SynchronousAssertionsTests.test_assertEqual_custom5  s    !!""!!Aq!!!Aq!!!a###a#####r   c                     d}|                      | j        | j        dd|          }|                     |t	          |                     dS )zi
        When a message is passed to L{assertEqual} it is included in the error
        message.
        messagefoobarN)assertRaisesrE   rF   rj   r#   )r   r   	exceptions      r   test_assertEqualMessagez2SynchronousAssertionsTests.test_assertEqualMessage>  sQ    
 %%!4#3UE7
 
	 	gs9~~.....r   c                     |                      | j        | j        ddd          }|                      | j        | j        dd          }|                     t          |          t          |                     dS )zz
        If a message is specified as L{None}, it is not included in the error
        message of L{assertEqual}.
        r   r   N)r   rE   rF   r#   )r   exceptionForNoneexceptionWithouts      r   test_assertEqualNoneMessagez6SynchronousAssertionsTests.test_assertEqualNoneMessageI  s    
  ,,!4#3UE4
 
  ,,!4#3UE
 
 	-..4D0E0EFFFFFr   c                    t                      }dg}	 |                     ||           |                     d                    ||                     d S # | j        $ r |                     d           Y d S t
          $ r Y d S w xY w)Nr   z7Comparing {!r} and {!r} should have raised an exceptionz6Fail raised when ValueError ought to have been raised.)r&   rF   r   formatrE   r(   )r   appler   s      r   test_assertEqual_incomparablez8SynchronousAssertionsTests.test_assertEqual_incomparableV  s    !!	UF+++ IIIPP6      $ 	P 	P 	PIINOOOOOO 	 	 	DD	s   A B6	BBc                     |r   r$   )r   errors     r   _raiseErrorz&SynchronousAssertionsTests._raiseErrorg  s    r   c                     |                      t          | j        t                    }|                     t	          |t                    d           d S )Nz?Expect failUnlessRaises to return instance of raised exception.)failUnlessRaisesr(   r   r~   
isinstancer   r   s     r   test_failUnlessRaises_expectedz9SynchronousAssertionsTests.test_failUnlessRaises_expectedj  sL    !!*d.>
KKq*%%P	
 	
 	
 	
 	
r   c                     	 |                      t          | j        t                     |                     d           d S # t          $ r |                     d           Y d S | j        $ r Y d S w xY w)Nz4Expected exception wasn't raised. Should have failedz9failUnlessRaises shouldn't re-raise unexpected exceptions)r   r(   r   	TypeErrorr   rE   r   s    r    test_failUnlessRaises_unexpectedz;SynchronousAssertionsTests.test_failUnlessRaises_unexpectedq  s    	N!!*d.>	JJJ IILMMMMM  	V 	V 	VIITUUUUUU$ 	 	 	DD	s   &? A.!	A.-A.c                     d	 |                      t          fd           |                     d           d S # | j        $ r.}|                     t          |          d           Y d }~d S d }~ww xY w)Nrb   c                       S r   r$   )returnValues   r   <lambda>zNSynchronousAssertionsTests.test_failUnlessRaises_noException.<locals>.<lambda>  s    k r   z(Exception not raised. Should have failedz"ValueError not raised (3 returned))r   r(   r   rE   rF   r#   )r   rl   r   s     @r   !test_failUnlessRaises_noExceptionz<SynchronousAssertionsTests.test_failUnlessRaises_noException|  s    	B!!*.A.A.A.ABBB II@AAAAA $ 	K 	K 	KSVV%IJJJJJJJJJ	Ks   : 
A2#A--A2c                 P   |                      | j        | j        | j                  }|                     t	          || j                  d| j        d           	 |                      | j        | j        t
                    }|                     d           d S # | j        $ r Y d S w xY w)Nz	Expected z instance to be returnedzShould have raised exception)r   rE   r   r~   r   r(   r   r   s     r   &test_failUnlessRaises_failureExceptionzASynchronousAssertionsTests.test_failUnlessRaises_failureException  s    !!!4#3T5J
 
 	q$/00I-III	
 	
 	
	6%%%t'7 A II455555	 $ 	 	 	DD	s   &B 
B%$B%c                     t          d          }|                     t                     5 }|# 1 swxY w Y   |                     ||j                   dS )z
        If C{assertRaises} is used to create a context manager and an exception
        is raised from the body of the C{with} statement then the context
        manager's C{exception} attribute is set to the exception that was
        raised.
        markerN)r(   r   assertIsr   )r   r   contexts      r    test_assertRaisesContextExpectedz;SynchronousAssertionsTests.test_assertRaisesContextExpected  sx     x((	z** 	gO	 	 	 	 	 	 	 	 	i!233333s   -11c                    	 |                      t                    5  t          d          # 1 swxY w Y   	 |                     d           dS # | j        $ r~}t          |          }d                    t          t                              }|                     |	                    |          d                    |                     Y d}~dS d}~ww xY w)z
        If C{assertRaises} is used to create a context manager and the wrong
        exception type is raised from the body of the C{with} statement then
        the C{with} statement raises C{failureException} describing the
        mismatch.
        r   N:Mismatched exception type should have caused test failure.z/{type} raised instead of ValueError:
 Traceback)typez=Exception message did not begin with expected information: {})
r   r(   r   r   rE   r#   r   r   r~   
startswith)r   r   r   r   s       r   "test_assertRaisesContextUnexpectedz=SynchronousAssertionsTests.test_assertRaisesContextUnexpected  s(   	T"":.. * *)))* * * * * * * * * IIRSSSSS $ 		 		 		)nnGMUU'	22 V  H OO""8,,VG__        		s.   A ,0A 0A 
CA3CCc                    	 |                      t                    5  	 ddd           n# 1 swxY w Y   |                     d           dS # | j        $ r0}t	          |          }|                     |d           Y d}~dS d}~ww xY w)z
        If C{assertRaises} is used to create a context manager and no exception
        is raised from the body of the C{with} statement then the C{with}
        statement raises C{failureException} describing the lack of exception.
        Nz5Non-exception result should have caused test failure.z%ValueError not raised (None returned))r   r(   r   rE   r#   rF   )r   r   r   s      r   #test_assertRaisesContextNoExceptionz>SynchronousAssertionsTests.test_assertRaisesContextNoException  s    
	O"":..                 IIMNNNNN $ 	O 	O 	O)nnG W&MNNNNNNNNN		Os2   A *A .A .A 
B%BBc                    	 |                      t          t          f          5  t                      # 1 swxY w Y   	 |                     d           dS # | j        $ r}t          |          }d|v}d|v}g }|r|                    d           |r|                    d           |r2|                     d                    |          d|            Y d}~dS Y d}~dS d}~ww xY w)	z
        If the exception type passed to C{assertRaises} does not have a
        C{__name__} then the context manager still manages to construct a
        descriptive string for it.
        Nr   r(   r   z(expected ValueError in exception messagez'expected TypeError in exception messagez; z
message = )	r   r(   r   AttributeErrorr   rE   r#   appendr=   )r   r   r   
valueError	typeErrorrP   s         r   test_brokenNamez*SynchronousAssertionsTests.test_brokenName  sk   	T""J	#:;; ' '$&&&' ' ' ' ' ' ' ' ' IIRSSSSS $ 
	E 
	E 
	E)nnG%W4J#72IF JHIII IGHHH E		$))F++-C'-C-CDDDDDDDDDE E E E E E
	Es.   !A 26A 6A 
C%A5C  C%c                     dgdgdg}}}|                      ||          }|                     ||d           |                     | j        | j         ||           |                     | j        | j         ||           d S )NrK   r`   )failIfEqual should return first parameter)failIfEqualrF   r   rE   r   r   r   r   rets        r   test_failIfEqual_basicz1SynchronousAssertionsTests.test_failIfEqual_basic  s    #sQCa1q!$$a!LMMMd3T5Eq!LLLd3T5Eq!LLLLLr   c                 ,   t          d          }t          d          }t          d          }|                     ||          }|                     ||d           |                     | j        | j        ||           |                     ||d           d S )Nr   r   fecundr   z"__ne__ should make these not equal)r   r   rF   r   rE   r   s        r   test_failIfEqual_customEqz4SynchronousAssertionsTests.test_failIfEqual_customEq  s    !!""""q!$$a!LMMMd3T5Eq!LLLACDDDDDr   c                     t                      }t                      }|                     ||          }|                     ||           dS )z
        C{failIfIdentical} returns its first argument if its first and second
        arguments are not the same object.
        N)objectfailIfIdenticalrF   )r   r   r   rH   s       r   test_failIfIdenticalPositivez7SynchronousAssertionsTests.test_failIfIdenticalPositive  sG    
 HHHH%%a++F#####r   c                 f    t                      }|                     | j        | j        ||           dS )z~
        C{failIfIdentical} raises C{failureException} if its first and second
        arguments are the same object.
        N)r   r   rE   r   r   s     r   test_failIfIdenticalNegativez7SynchronousAssertionsTests.test_failIfIdenticalNegative   s3    
 HHd3T5I1aPPPPPr   c                     dgdgdg}}}|                      ||          }|                     ||d           |                     | j        | j         ||           |                     | j        | j         ||           d S )NrK   r`   z1failUnlessIdentical should return first parameter)failUnlessIdenticalrF   r   rE   r   s        r   test_failUnlessIdenticalz3SynchronousAssertionsTests.test_failUnlessIdentical  s    #sQCa1&&q!,,a!WXXXd3T5MqRSTTTd3T5MqRSTTTTTr   c                 (   d\  }}}|                      ||d           |                      ||d          }|                     ||d           |                     | j        | j         ||d           |                     | j        | j         ||d           d S )N)g      ?g?g333333?g?z4failUnlessApproximates should return first parameterg?)failUnlessApproximatesrF   r   rE   r   s        r   test_failUnlessApproximatesz6SynchronousAssertionsTests.test_failUnlessApproximates  s    1a##Aq#...))!Q44M	
 	
 	
 	!4#>1c	
 	
 	
 	!4#>1c	
 	
 	
 	
 	
r   c           	          d}d}d}d}|                      |||           |                      |||          }|                     ||d|d|d           |                     | j        | j         |||           d S )N   A!   @XO  @C   @z5failUnlessAlmostEqual should return first parameter (r   r   )failUnlessAlmostEqualrF   r   rE   r   	precisionr   r   r   r   s         r   test_failUnlessAlmostEqualz5SynchronousAssertionsTests.test_failUnlessAlmostEqual  s    	""1a333((Ay99A*-##qqq2	
 	
 	
 	!4#=q!Y	
 	
 	
 	
 	
r   c           	         d}d}d}d}|                      |||          }|                     ||d|d|d           |                     | j        | j         |||           |                     | j        | j         |||           d S )Nr   r   r   r   z1failIfAlmostEqual should return first parameter (r   r   )failIfAlmostEqualrF   r   rE   r   s         r   test_failIfAlmostEqualz1SynchronousAssertionsTests.test_failIfAlmostEqual.  s    	$$Q955AMPSSRSRSRST	
 	
 	

 	!4#91a	
 	
 	
 	!4#91a	
 	
 	
 	
 	
r   c                     d}d}d}|                      ||           |                      ||          }|                     ||d           |                     | j        | j         ||           |                     | j        | j         ||           d S Nr_   zthe dog satzthe cat satzshould return first parameter)failUnlessSubstringrF   r   rE   r   s        r   test_failUnlessSubstringz3SynchronousAssertionsTests.test_failUnlessSubstring@  s      A&&&&&q!,,a!@AAAd3T5MqRSTTTd3T5MqRSTTTTTr   c                     d}d}d}|                      ||           |                      ||          }|                     ||d           |                     | j        | j         ||           |                     | j        | j         ||           d S r   )failIfSubstringrF   r   rE   r   s        r   test_failIfSubstringz/SynchronousAssertionsTests.test_failIfSubstringJ  s    Q"""""1a((a!@AAAd3T5I1aPPPd3T5I1aPPPPPr   c                 P    t          d          }|                     ||           dS )zB
        L{assertIs} passes if two objects are identical.
        r   N)r   r   r   as     r   test_assertIsz(SynchronousAssertionsTests.test_assertIsT  s+     !!ar   c                     t          d          t          d          }}|                     ||           |                     | j        | j        ||           dS )zE
        L{assertIs} fails if two objects are not identical.
        r   N)r   rF   r   rE   r   r   r   bs      r   test_assertIsErrorz-SynchronousAssertionsTests.test_assertIsError[  sX     G$$l7&;&;1A$/1EEEEEr   c                     t          d          t          d          }}|                     ||           |                     ||           dS )zI
        L{assertIsNot} passes if two objects are not identical.
        r   N)r   rF   assertIsNotr  s      r   test_assertIsNotz+SynchronousAssertionsTests.test_assertIsNotc  sO     G$$l7&;&;1AAr   c                 h    t          d          }|                     | j        | j        ||           dS )zD
        L{assertIsNot} fails if two objects are identical.
        r   N)r   r   rE   r  r   s     r   test_assertIsNotErrorz0SynchronousAssertionsTests.test_assertIsNotErrork  s7     !!$/1A1aHHHHHr   c                 t    t          dt          fi           } |            }|                     ||           dS )z<
        Test a true condition of assertIsInstance.
        ANr   r   assertIsInstance)r   r  r   s      r   test_assertIsInstancez0SynchronousAssertionsTests.test_assertIsInstancer  s>     vi$$ACCa#####r   c                     t          dt          fi           }t          dt          fi           } |            }|                     |||f           dS )zR
        Test a true condition of assertIsInstance with multiple classes.
        r  BNr  r   r  r  r   s       r   $test_assertIsInstanceMultipleClassesz?SynchronousAssertionsTests.test_assertIsInstanceMultipleClassesz  sU     vi$$vi$$ACCa!Q(((((r   c                     t          dt          fi           }t          dt          fi           } |            }|                     | j        | j        ||           dS )z6
        Test an error with assertIsInstance.
        r  r  Nr   r   r   rE   r  r  s       r   test_assertIsInstanceErrorz5SynchronousAssertionsTests.test_assertIsInstanceError  s[     vi$$vi$$ACC$/1F1MMMMMr   c                     t          dt          fi           }t          dt          fi           }t          dt          fi           } |            }|                     | j        | j        |||f           dS )zK
        Test an error with assertIsInstance and multiple classes.
        r  r  CNr  r   r  r  r  r   s        r   )test_assertIsInstanceErrorMultipleClasseszDSynchronousAssertionsTests.test_assertIsInstanceErrorMultipleClasses  sr     vi$$vi$$vi$$ACC$/1FAq6RRRRRr   c                     |                      | j        | j        dt          d          }|                     dt          |                     dS )z
        If L{TestCase.assertIsInstance} is passed a custom message as its 3rd
        argument, the message is included in the failure exception raised when
        the assertion fails.
        rb   zSilly assertionN)r   rE   r  r#   rj   )r   excs     r   "test_assertIsInstanceCustomMessagez=SynchronousAssertionsTests.test_assertIsInstanceCustomMessage  sN     !4#8!SBS
 
 	'S22222r   c                     t          dt          fi           }t          dt          fi           } |            }|                     ||           dS )z?
        Test a true condition of assertNotIsInstance.
        r  r  Nr   r   assertNotIsInstancer  s       r   test_assertNotIsInstancez3SynchronousAssertionsTests.test_assertNotIsInstance  sQ     vi$$vi$$ACC  A&&&&&r   c                     t          dt          fi           }t          dt          fi           }t          dt          fi           } |            }|                     |||f           dS )zT
        Test a true condition of assertNotIsInstance and multiple classes.
        r  r  r  Nr  r  s        r   'test_assertNotIsInstanceMultipleClasseszBSynchronousAssertionsTests.test_assertNotIsInstanceMultipleClasses  sh     vi$$vi$$vi$$ACC  QF+++++r   c                     t          dt          fi           } |            }|                     | j        | j        ||          }|                     t          |          |d|            dS )z9
        Test an error with assertNotIsInstance.
        r  z is an instance of N)r   r   r   rE   r  rF   r#   )r   r  r   r   s       r   test_assertNotIsInstanceErrorz8SynchronousAssertionsTests.test_assertNotIsInstanceError  ss     vi$$ACC!!$"79QSTVWXXU%C%C%C%CDDDDDr   c                     t          dt          fi           }t          dt          fi           } |            }|                     | j        | j        |||f           dS )zN
        Test an error with assertNotIsInstance and multiple classes.
        r  r  N)r   r   r   rE   r  r  s       r   ,test_assertNotIsInstanceErrorMultipleClasseszGSynchronousAssertionsTests.test_assertNotIsInstanceErrorMultipleClasses  s`     vi$$vi$$ACC$/1I1qRSfUUUUUr   c                 :    |                      ddiddi           dS )z
        L{twisted.trial.unittest.TestCase} supports the C{assertDictEqual}
        method inherited from the standard library in Python 2.7.
        r   rK   N)assertDictEqualr   s    r   test_assertDictEqualz/SynchronousAssertionsTests.test_assertDictEqual  s(    
 	c1XQx00000r   r(  Nz:assertDictEqual is not available on this version of Python)0r   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   r   r   r   r   r   r  r  r	  r  r  r  r  r  r   r"  r$  r&  r)  getattrr   rT   skipr$   r   r   r   r     s       	 	C C C
Q Q Q.- - -$ $ $	/ 	/ 	/G G G  "  
 
 
	N 	N 	NB B B6 6 6$4 4 4T T T.O O O$T T T0M M ME E E$ $ $Q Q QU U U
 
 

 
 
"
 
 
$U U UQ Q Q  F F F  I I I$ $ $) ) )N N NS S S	3 	3 	3' ' ', , ,E E EV V V1 1 1 wx+->EEMH 	!!! NMr   r   c                   \    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd ZdS )WarningAssertionTestsc                 ~    d }|                      t          dt          |d          }|                     |d           dS )z0
        Test basic assertWarns report.
        c                 <    t          j        dt                     | S NWoo deprecatedcategorywarningswarnDeprecationWarningr   s    r   r   z:WarningAssertionTests.test_assertWarns.<locals>.deprecated      M*5GHHHHHr   r1  {   NassertWarnsr7  __file__rF   r   r   rs      r   test_assertWarnsz&WarningAssertionTests.test_assertWarns  sR    
	 	 	  0(J
 
 	C     r   c                     d }|                      t          dt          |d          }|                     |d           |                      t          dt          |d          }|                     |d           dS )z}
        Test that assertWarns cleans the warning registry, so the warning is
        not swallowed the second time.
        c                 <    t          j        dt                     | S r0  r4  r8  s    r   r   zGWarningAssertionTests.test_assertWarnsRegistryClean.<locals>.deprecated  r9  r   r1  r:  A  Nr;  )r   r   r1r2s       r   test_assertWarnsRegistryCleanz3WarningAssertionTests.test_assertWarnsRegistryClean  s    	 	 	  0(J
 
 	S!!! 0(J
 
 	S!!!!!r   c           	      j    d }|                      | j        | j        t          dt          |d           dS )zH
        Test assertWarns failure when no warning is generated.
        c                     | S r   r$   r8  s    r   normalz;WarningAssertionTests.test_assertWarnsError.<locals>.normal  s    Hr   r1  r:  Nr   rE   r<  r7  r=  )r   rI  s     r   test_assertWarnsErrorz+WarningAssertionTests.test_assertWarnsError  sP    
	 	 	 	!	
 	
 	
 	
 	
r   c           	      j    d }|                      | j        | j        t          dt          |d           dS )zF
        Test assertWarns failure when the category is wrong.
        c                 <    t          j        dt                     | S NFoo deprecatedr2  r4  r8  s    r   r   zGWarningAssertionTests.test_assertWarnsWrongCategory.<locals>.deprecated  r9  r   rO  r:  N)r   rE   r<  UserWarningr=  r   r   s     r   test_assertWarnsWrongCategoryz3WarningAssertionTests.test_assertWarnsWrongCategory  sP    
	 	 	 	!	
 	
 	
 	
 	
r   c           	      j    d }|                      | j        | j        t          dt          |d           dS )zE
        Test assertWarns failure when the message is wrong.
        c                 <    t          j        dt                     | S rN  r4  r8  s    r   r   zFWarningAssertionTests.test_assertWarnsWrongMessage.<locals>.deprecated   r9  r   Bar deprecatedr:  NrJ  rQ  s     r   test_assertWarnsWrongMessagez2WarningAssertionTests.test_assertWarnsWrongMessage  sP    
	 	 	 	!	
 	
 	
 	
 	
r   c           	      j    d }|                      | j        | j        t          dt          |d           dS )z
        If the warning emitted by a function refers to a different file than is
        passed to C{assertWarns}, C{failureException} is raised.
        c                 >    t          j        dt          d           d S )NrO  r`   )r3  
stacklevelr4  r8  s    r   r   zCWarningAssertionTests.test_assertWarnsWrongFile.<locals>.deprecated4  s$     M*5GTUVVVVVVr   rO  r:  NrJ  rQ  s     r   test_assertWarnsWrongFilez/WarningAssertionTests.test_assertWarnsWrongFile.  sU    
	W 
	W 
	W 	! 	
 	
 	
 	
 	
r   c                 4    G d d          }|                      t          dt          |          }|                     t	          ||                     |                      t          dt          |          }|                     t	          ||                     dS )zH
        Test assertWarns works when creating a class instance.
        c                       e Zd Zd ZdS );WarningAssertionTests.test_assertWarnsOnClass.<locals>.Warnc                 <    t          j        dt                     d S )NDo not call mer2  )r5  r6  RuntimeWarningr   s    r   r   zDWarningAssertionTests.test_assertWarnsOnClass.<locals>.Warn.__init__S  s    .HHHHHHr   N)r   r    r!   r   r$   r   r   Warnr]  R  s(        I I I I Ir   ra  r_  N)r<  r`  r=  r~   r   )r   ra  r?  s      r   test_assertWarnsOnClassz-WarningAssertionTests.test_assertWarnsOnClassM  s    
	I 	I 	I 	I 	I 	I 	I 	I ^-=xNN
1d++,,,^-=xNN
1d++,,,,,r   c                 ,    G d d          } |            }|                      t          dt          |j        d          }|                     |d           |                      t          dt          |j        d          }|                     |d           dS )zI
        Test assertWarns works when used on an instance method.
        c                       e Zd Zd ZdS )<WarningAssertionTests.test_assertWarnsOnMethod.<locals>.Warnc                 <    t          j        dt                     |S )NrU  r2  r4  r   s     r   r   zGWarningAssertionTests.test_assertWarnsOnMethod.<locals>.Warn.deprecateda      .9KLLLLr   N)r   r    r!   r   r$   r   r   ra  re  `  #            r   ra  rU  rC  N)r<  r7  r=  r   rF   r   ra  wr?  s       r   test_assertWarnsOnMethodz.WarningAssertionTests.test_assertWarnsOnMethod[  s    
	 	 	 	 	 	 	 	
 DFF 0(AL#
 
 	C    0(AL#
 
 	C     r   c                     G d d          } |            }|                      t          dt          |d          }|                     |d           |                      t          dt          |d          }|                     |d           dS )zM
        Test assertWarns works on instance with C{__call__} method.
        c                       e Zd Zd ZdS ):WarningAssertionTests.test_assertWarnsOnCall.<locals>.Warnc                 <    t          j        dt                     |S )NEgg deprecatedr2  r4  r   s     r   __call__zCWarningAssertionTests.test_assertWarnsOnCall.<locals>.Warn.__call__u  rg  r   N)r   r    r!   rq  r$   r   r   ra  rn  t  rh  r   ra  rp  rC  Nr;  ri  s       r   test_assertWarnsOnCallz,WarningAssertionTests.test_assertWarnsOnCallo  s    
	 	 	 	 	 	 	 	
 DFF/1A8QPSTTC   /1A8QPSTTC     r   c                 ~    d }|                      t          dt          |d          }|                     |d           dS )zD
        Test assertWarns on a warning filtered by default.
        c                 <    t          j        dt                     | S r0  r5  r6  PendingDeprecationWarningr8  s    r   r   z@WarningAssertionTests.test_assertWarnsFilter.<locals>.deprecated  s    M*5NOOOOHr   r1  r:  N)r<  rv  r=  rF   r>  s      r   test_assertWarnsFilterz,WarningAssertionTests.test_assertWarnsFilter  sR    
	 	 	 %'7:s
 
 	C     r   c                 \    d fd}|                      t          dt          |           dS )z
        C{assertWarns} does not raise an exception if the function it is passed
        triggers the same warning more than once.
        c                  <    t          j        dt                     d S r0  ru  r$   r   r   r   zJWarningAssertionTests.test_assertWarnsMultipleWarnings.<locals>.deprecated  s    M*5NOOOOOOr   c                  0                                  d S r   r$   )r   s   r   fzAWarningAssertionTests.test_assertWarnsMultipleWarnings.<locals>.f  s    JLLLJLLLLLr   r1  N)r<  rv  r=  )r   r{  r   s     @r    test_assertWarnsMultipleWarningsz6WarningAssertionTests.test_assertWarnsMultipleWarnings  sS    	P 	P 	P	 	 	 	 	 	24DhPQRRRRRr   c           	          d }|                      | j        | j        t          dt          |d          }|                     t          |          d           dS )z
        For now, assertWarns is unable to handle multiple different warnings,
        so it should raise an exception if it's the case.
        c                 r    t          j        dt                     t          j        dt                     d S )Nr1  r2  zAnother one)r5  r6  r7  rv  r8  s    r   r   zKWarningAssertionTests.test_assertWarnsDifferentWarnings.<locals>.deprecated  s5    M*5GHHHHM-2KLLLLLLr   r1  r:  zCan't handle different warningsN)r   rE   r<  r7  r=  rF   r#   )r   r   rl   s      r   !test_assertWarnsDifferentWarningsz7WarningAssertionTests.test_assertWarnsDifferentWarnings  sk    	M 	M 	M !
 
 	Q!BCCCCCr   c                      G d dt                     fd} |d           |                     dt          |d           |                     |g          \  }|                     |d         d           dS )z
        Warnings emitted before L{TestCase.assertWarns} is called do not get
        flushed and do not alter the behavior of L{TestCase.assertWarns}.
        c                       e Zd ZdS )PWarningAssertionTests.test_assertWarnsAfterUnassertedWarning.<locals>.TheWarningN)r   r    r!   r$   r   r   
TheWarningr    s        Dr   r  c                 4    t          j        |            d S )Nr2  )r5  r6  )r   r  s    r   r{  zGWarningAssertionTests.test_assertWarnsAfterUnassertedWarning.<locals>.f  s    M'J777777r   r   r   r   N)Warningr<  r=  flushWarningsrF   )r   r{  warningr  s      @r   &test_assertWarnsAfterUnassertedWarningz<WarningAssertionTests.test_assertWarnsAfterUnassertedWarning  s    	 	 	 	 	 	 	 		8 	8 	8 	8 	8 	
%UHa???&&s++	+U33333r   N)r   r    r!   r@  rF  rK  rR  rV  rZ  rb  rk  rr  rw  r|  r  r  r$   r   r   r-  r-    s        ! ! !" " "(
 
 
$
 
 
&
 
 
&
 
 
>- - -! ! !(! ! ! ! ! !S S SD D D*4 4 4 4 4r   r-  c                       e Zd ZdZ e            Z e ed                    Zd Z	d Z
d Zd Zd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )ResultOfAssertionsTestsz
    Tests for L{SynchronousTestCase.successResultOf},
    L{SynchronousTestCase.failureResultOf}, and
    L{SynchronousTestCase.assertNoResult}.
    	Bad timesc                 `    |                      | j        | j        t                                 dS )z
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with no current result.
        N)r   rE   successResultOfr   r   s    r   test_withoutResultz*ResultOfAssertionsTests.test_withoutResult  ,     	$/1ExzzRRRRRr   c                 l    |                      | j        | j        t          | j                             dS )z
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with a failure result.
        N)r   rE   r  r   failurer   s    r   test_successResultOfWithFailurez7ResultOfAssertionsTests.test_successResultOfWithFailure  s=     	!4#7dl9K9K	
 	
 	
 	
 	
r   c                     	 |                      t          | j                             dS # | j        $ rE}|                     | j                                        t          |                     Y d}~dS d}~ww xY w)z
        L{SynchronousTestCase.successResultOf} raises a
        L{SynchronousTestCase.failureException} that has the original failure
        traceback when called with a L{Deferred} with a failure result.
        N)r  r   r  rE   rj   getTracebackr#   r   rl   s     r   +test_successResultOfWithFailureHasTracebackzCResultOfAssertionsTests.test_successResultOfWithFailureHasTraceback  s    	?  dl!3!344444$ 	? 	? 	?MM$,3355s1vv>>>>>>>>>	?s   '+ 
A::A55A:c                 `    |                      | j        | j        t                                 dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with no current result.
        N)r   rE   failureResultOfr   r   s    r   !test_failureResultOfWithoutResultz9ResultOfAssertionsTests.test_failureResultOfWithoutResult  r  r   c                 l    |                      | j        | j        t          | j                             dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with a success result.
        N)r   rE   r  r   rH   r   s    r   test_failureResultOfWithSuccessz7ResultOfAssertionsTests.test_failureResultOfWithSuccess  s=     	!4#79M9M	
 	
 	
 	
 	
r   c                 x    |                      | j        | j        t          | j                  t
                     dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected.
        N)r   rE   r  r   r  KeyErrorr   s    r   $test_failureResultOfWithWrongFailurez<ResultOfAssertionsTests.test_failureResultOfWithWrongFailure  s?     	!4#7dl9K9KX	
 	
 	
 	
 	
r   c                 (   	 |                      t          | j                  t                     dS # | j        $ rV}|                     d                    t          j        t          j                  t          |                     Y d}~dS d}~ww xY w)a=  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the expected
        exception type.
        #Failure of type ({}.{}) expected onN)
r  r   r  r  rE   rj   r   r    r   r#   r  s     r   6test_failureResultOfWithWrongFailureOneExpectedFailurezNResultOfAssertionsTests.test_failureResultOfWithWrongFailureOneExpectedFailure  s    	  dl!3!3X>>>>>$ 	 	 	MM5<<'):  A	        	   -1 
BABBc                    	 |                      t          | j                  t                     dS # | j        $ rE}|                     | j                                        t          |                     Y d}~dS d}~ww xY w)a@  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        that fails with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        failure traceback.
        N)r  r   r  r  rE   rj   r  r#   r  s     r   ;test_failureResultOfWithWrongFailureOneExpectedFailureHasTBzSResultOfAssertionsTests.test_failureResultOfWithWrongFailureOneExpectedFailureHasTB  s    	?  dl!3!3X>>>>>$ 	? 	? 	?MM$,3355s1vv>>>>>>>>>	?s   -1 
B :A;;B c           	      `   	 |                      t          | j                  t          t                     dS # | j        $ rl}|                     d                    t          j        t          j	        t          j        t          j	                  t          |                     Y d}~dS d}~ww xY w)aH  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the expected
        exception types in the error message.
        ,Failure of type ({}.{} or {}.{}) expected onN)r  r   r  r  IOErrorrE   rj   r   r    r   r#   r  s     r   9test_failureResultOfWithWrongFailureMultiExpectedFailureszQResultOfAssertionsTests.test_failureResultOfWithWrongFailureMultiExpectedFailures%  s    	  dl!3!3XwGGGGG$ 		 		 		MM>EE'%&$	  A        		   37 
B-A!B((B-c                    	 |                      t          | j                  t          t                     dS # | j        $ rE}|                     | j                                        t          |                     Y d}~dS d}~ww xY w)aJ  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a L{Deferred}
        with an exception type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        failure traceback in the error message.
        N)	r  r   r  r  r  rE   rj   r  r#   r  s     r   >test_failureResultOfWithWrongFailureMultiExpectedFailuresHasTBzVResultOfAssertionsTests.test_failureResultOfWithWrongFailureMultiExpectedFailuresHasTB:  s    	?  dl!3!3XwGGGGG$ 	? 	? 	?MM$,3355s1vv>>>>>>>>>	?s   37 
B:BBc                     |                      | j        |                     t          | j                                       dS )a  
        When passed a L{Deferred} which currently has a result (ie,
        L{Deferred.addCallback} would cause the added callback to be called
        before C{addCallback} returns), L{SynchronousTestCase.successResultOf}
        returns that result.
        N)assertIdenticalrH   r  r   r   s    r   %test_successResultOfWithSuccessResultz=ResultOfAssertionsTests.test_successResultOfWithSuccessResultG  s:     	T[$*>*>wt{?S?S*T*TUUUUUr   c                     |                      | j        |                     t          | j                  | j        j        t
                               dS )a=  
        When passed a L{Deferred} which currently has a L{Failure} result (ie,
        L{Deferred.addErrback} would cause the added errback to be called
        before C{addErrback} returns), L{SynchronousTestCase.failureResultOf}
        returns that L{Failure} if its contained exception type is expected.
        N)r  r  r  r   r   r  r   s    r   -test_failureResultOfWithExpectedFailureResultzEResultOfAssertionsTests.test_failureResultOfWithExpectedFailureResultP  sO     	L  dl!3!3T\5FQQ	
 	
 	
 	
 	
r   c                     |                      | j        |                     t          | j                                       dS )a  
        When passed a L{Deferred} which currently has a L{Failure} result
        (ie, L{Deferred.addErrback} would cause the added errback to be called
        before C{addErrback} returns), L{SynchronousTestCase.failureResultOf}
        returns that L{Failure}.
        N)r  r  r  r   r   s    r   %test_failureResultOfWithFailureResultz=ResultOfAssertionsTests.test_failureResultOfWithFailureResult\  s:     	T\4+?+?T\@R@R+S+STTTTTr   c                 l    |                      | j        | j        t          | j                             dS )z
        When passed a L{Deferred} which currently has a success result (see
        L{test_withSuccessResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r   rE   assertNoResultr   rH   r   s    r   test_assertNoResultSuccessz2ResultOfAssertionsTests.test_assertNoResultSuccesse  s=     	!4#68L8L	
 	
 	
 	
 	
r   c                 l    |                      | j        | j        t          | j                             dS )z
        When passed a L{Deferred} which currently has a failure result (see
        L{test_withFailureResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r   rE   r  r   r  r   s    r   test_assertNoResultFailurez2ResultOfAssertionsTests.test_assertNoResultFailureo  s=     	!4#6T\8J8J	
 	
 	
 	
 	
r   c                 H    |                      t                                 dS )z
        When passed a L{Deferred} with no current result,
        L{SynchronousTestCase.assertNoResult} does not raise an exception.
        N)r  r   r   s    r   test_assertNoResultz+ResultOfAssertionsTests.test_assertNoResulty  s"    
 	HJJ'''''r   c                     t                      }|                     |           |                    | j                   |                     | j        |                     |                     dS )z
        When passed a L{Deferred} with no current result, which is then
        fired with a success result, L{SynchronousTestCase.assertNoResult}
        doesn't modify the result of the L{Deferred}.
        Nr   r  callbackrH   rF   r  r   ds     r   $test_assertNoResultPropagatesSuccessz<ResultOfAssertionsTests.test_assertNoResultPropagatesSuccess  sa     JJA	

4;d&:&:1&=&=>>>>>r   c                     t                      }|                     |           |                    | j                   |                     | j        |                     |                     dS )z
        When passed a L{Deferred} with no current result, which is then
        fired with a L{Failure} result, L{SynchronousTestCase.assertNoResult}
        doesn't modify the result of the L{Deferred}.
        N)r   r  errbackr  rF   r  r  s     r   )test_assertNoResultPropagatesLaterFailurezAResultOfAssertionsTests.test_assertNoResultPropagatesLaterFailure  sa     JJA			$,t';';A'>'>?????r   c                     t          | j                  }	 |                     |           n# | j        $ r Y nw xY w|                     d|                     |                     dS )
        When passed a L{Deferred} which currently has a L{Failure} result,
        L{SynchronousTestCase.assertNoResult} changes the result of the
        L{Deferred} to a success.
        Nr   r  r  rE   rF   r  r  s     r   +test_assertNoResultSwallowsImmediateFailurezCResultOfAssertionsTests.test_assertNoResultSwallowsImmediateFailure  s|     	""""$ 	 	 	D	t33A6677777s   , 
99N)r   r    r!   r+   r   rH   r
   	Exceptionr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r$   r   r   r  r    sp         VXXFgii,,--GS S S
 
 
	? 	? 	?S S S
 
 

 
 
  $? ? ?  *? ? ?V V V

 

 

U U U
 
 

 
 
( ( (	? 	? 	?	@ 	@ 	@8 8 8 8 8r   r  c                       e Zd ZdZ e            Z ed          Z ee          Z	d Z
d ZddZd Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS ) ResultOfCoroutineAssertionsTestsz
    Tests for L{SynchronousTestCase.successResultOf},
    L{SynchronousTestCase.failureResultOf}, and
    L{SynchronousTestCase.assertNoResult} when given a coroutine.
    r  c                    K   | j         S r   )rH   r   s    r   successResultz.ResultOfCoroutineAssertionsTests.successResult  s      {r   c                 2   K   t                       d {V  d S r   )r   r   s    r   noCurrentResultz0ResultOfCoroutineAssertionsTests.noCurrentResult  s(      jjr   Nc                    K   || j         }|r   )r   r   r   s     r   raisesExceptionz0ResultOfCoroutineAssertionsTests.raisesException  s      Ir   c                 l    |                      | j        | j        |                                            dS )z
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with no current result.
        N)r   rE   r  r  r   s    r   r  z3ResultOfCoroutineAssertionsTests.test_withoutResult  ?     	!4#79M9M9O9O	
 	
 	
 	
 	
r   c                 l    |                      | j        | j        |                                            dS )z
        L{SynchronousTestCase.successResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception.
        N)r   rE   r  r  r   s    r   !test_successResultOfWithExceptionzBResultOfCoroutineAssertionsTests.test_successResultOfWithException  r  r   c                 2   t          d          }	 |                     |                     |                     dS # | j        $ rQ}|                     dt          |                     |                     dt          |                     Y d}~dS d}~ww xY w)z
        L{SynchronousTestCase.successResultOf} raises a
        L{SynchronousTestCase.failureException} that has the original failure
        traceback when called with a coroutine with a failure result.
        r  zSuccess result expected onbuiltins.Exception: Bad timesN)r  r  r  rE   rj   r#   r   r   rl   s      r   r  zLResultOfCoroutineAssertionsTests.test_successResultOfWithFailureHasTraceback  s     k**		C  !5!5i!@!@AAAAA$ 	C 	C 	CMM6A???MM93q66BBBBBBBBB	Cs   (; 
BABBc                 l    |                      | j        | j        |                                            dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with no current result.
        N)r   rE   r  r  r   s    r   r  zBResultOfCoroutineAssertionsTests.test_failureResultOfWithoutResult  r  r   c                 l    |                      | j        | j        |                                            dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        with a success result.
        N)r   rE   r  r  r   s    r   r  z@ResultOfCoroutineAssertionsTests.test_failureResultOfWithSuccess  s?     	!4#79K9K9M9M	
 	
 	
 	
 	
r   c                 x    |                      | j        | j        |                                 t                     dS )z
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception that was not expected.
        N)r   rE   r  r  r  r   s    r   r  zEResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongFailure  sD     	!   ""		
 	
 	
 	
 	
r   c                 (   	 |                      |                                 t                     dS # | j        $ rV}|                     d                    t          j        t          j                  t          |                     Y d}~dS d}~ww xY w)aF  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception with a failure type that was not expected, and
        the L{SynchronousTestCase.failureException} message contains the
        expected exception type.
        r  N)	r  r  r  rE   rj   r   r    r   r#   r  s     r   :test_failureResultOfWithWrongExceptionOneExpectedExceptionz[ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionOneExpectedException  s    	  !5!5!7!7BBBBB$ 	 	 	MM5<<'):  A	        	r  c                 >   t          d          }	 |                     |                     |          t                     dS # | j        $ rQ}|                     dt          |                     |                     dt          |                     Y d}~dS d}~ww xY w)aK  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception with a failure type that was not expected, and
        the L{SynchronousTestCase.failureException} message contains the
        original exception traceback.
        r  z/Failure of type (builtins.KeyError) expected onr  N)r  r  r  r  rE   rj   r#   r  s      r   ?test_failureResultOfWithWrongExceptionOneExpectedExceptionHasTBz`ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionOneExpectedExceptionHasTB  s     k**		C  !5!5i!@!@(KKKKK$ 	C 	C 	CMMKSQRVVTTTMM93q66BBBBBBBBB	Cs   .A 
BABBc           	      `   	 |                      |                                 t          t                     dS # | j        $ rl}|                     d                    t          j        t          j        t          j        t          j                  t          |                     Y d}~dS d}~ww xY w)aN  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception of a type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains expected
        exception types in the error message.
        r  N)
r  r  r  r  rE   rj   r   r    r   r#   r  s     r   =test_failureResultOfWithWrongExceptionMultiExpectedExceptionsz^ResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionMultiExpectedExceptions  s    	  !5!5!7!77KKKKK$ 		 		 		MM>EE'%&$	  A        		r  c                 J   t          d          }	 |                     |                     |          t          t                     dS # | j        $ rQ}|                     dt          |                     |                     dt          |                     Y d}~dS d}~ww xY w)aV  
        L{SynchronousTestCase.failureResultOf} raises
        L{SynchronousTestCase.failureException} when called with a coroutine
        that raises an exception of a type that was not expected, and the
        L{SynchronousTestCase.failureException} message contains the original
        exception traceback in the error message.
        r  zCFailure of type (builtins.KeyError or builtins.OSError) expected onr  N)r  r  r  r  r  rE   rj   r#   r  s      r   Btest_failureResultOfWithWrongExceptionMultiExpectedExceptionsHasTBzcResultOfCoroutineAssertionsTests.test_failureResultOfWithWrongExceptionMultiExpectedExceptionsHasTB2  s     k**		C  !5!5i!@!@(GTTTTT$ 	C 	C 	CMMUA   MM93q66BBBBBBBBB	Cs   4A 
B"ABB"c                     |                      | j        |                     |                                                      dS )a$  
        When passed a coroutine which currently has a result (ie, if converted
        into a L{Deferred}, L{Deferred.addCallback} would cause the added
        callback to be called before C{addCallback} returns),
        L{SynchronousTestCase.successResultOf} returns that result.
        N)r  rH   r  r  r   s    r   r  zFResultOfCoroutineAssertionsTests.test_successResultOfWithSuccessResultE  s<     	T[$*>*>t?Q?Q?S?S*T*TUUUUUr   c                     |                      | j        j        |                     |                                 | j        j        t                    j                   dS )ar  
        When passed a coroutine which currently has an exception result (ie, if
        converted into a L{Deferred}, L{Deferred.addErrback} would cause the
        added errback to be called before C{addErrback} returns),
        L{SynchronousTestCase.failureResultOf} returns a L{Failure} containing
        that exception, if the exception type is expected.
        N)rF   r  valuer  r  r   r  r   s    r   )test_failureResultOfWithExpectedExceptionzJResultOfCoroutineAssertionsTests.test_failureResultOfWithExpectedExceptionN  s\     	L  $$&&(98 		
 	
 	
 	
 	
r   c                     |                      | j        j        |                     |                                           j                   dS )aW  
        When passed a coroutine which currently has an exception result (ie, if
        converted into a L{Deferred}, L{Deferred.addErrback} would cause the
        added errback to be called before C{addErrback} returns),
        L{SynchronousTestCase.failureResultOf} returns returns a L{Failure}
        containing that exception.
        N)rF   r  r  r  r  r   s    r   !test_failureResultOfWithExceptionzBResultOfCoroutineAssertionsTests.test_failureResultOfWithException]  sM     	L 4 4T5I5I5K5K L L R	
 	
 	
 	
 	
r   c                 l    |                      | j        | j        |                                            dS )z
        When passed a coroutine which currently has a success result (see
        L{test_withSuccessResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r   rE   r  r  r   s    r   r  z;ResultOfCoroutineAssertionsTests.test_assertNoResultSuccessi  s?     	!4#68J8J8L8L	
 	
 	
 	
 	
r   c                 l    |                      | j        | j        |                                            dS )z
        When passed a coroutine which currently has an exception result (see
        L{test_withFailureResult}), L{SynchronousTestCase.assertNoResult}
        raises L{SynchronousTestCase.failureException}.
        N)r   rE   r  r  r   s    r   r  z;ResultOfCoroutineAssertionsTests.test_assertNoResultFailures  s?     	!4#68L8L8N8N	
 	
 	
 	
 	
r   c                 T    |                      |                                            dS )z
        When passed a coroutine with no current result,
        L{SynchronousTestCase.assertNoResult} does not raise an exception.
        N)r  r  r   s    r   r  z4ResultOfCoroutineAssertionsTests.test_assertNoResult}  s*    
 	D002233333r   c                     t                      fd} |            }|                                                    | j                   |                     | j        |                     |                     dS )z
        When passed a coroutine awaiting a L{Deferred} with no current result,
        which is then fired with a success result,
        L{SynchronousTestCase.assertNoResult} doesn't modify the result of the
        L{Deferred}.
        c                     K     d {V S r   r$   r  s   r   r  z^ResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesSuccess.<locals>.noCurrentResult        777777Nr   Nr  )r   r  cr  s      @r   r  zEResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesSuccess  s     JJ	 	 	 	 	 OA	

4;d&:&:1&=&=>>>>>r   c                 $   t          | j                  }t                      fd} |            }|                                                    |           |                     |j        |                     |          j                   dS )z
        When passed a coroutine awaiting a L{Deferred} with no current result,
        which is then fired with a L{Failure} result,
        L{SynchronousTestCase.assertNoResult} doesn't modify the result of the
        L{Deferred}.
        c                     K     d {V S r   r$   r  s   r   r  zcResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesLaterFailure.<locals>.noCurrentResult  r  r   N)r
   r   r   r  r  rF   r  r  )r   r{  r  r  r  s       @r   r  zJResultOfCoroutineAssertionsTests.test_assertNoResultPropagatesLaterFailure  s     DN##JJ	 	 	 	 	 OA			!$"6"6q"9"9"?@@@@@r   c                     t          | j                  fd} |            }	 |                                n# | j        $ r Y nw xY w|                     d|                     |                     dS )r  c                     K     d {V S r   r$   r  s   r   r  zeResultOfCoroutineAssertionsTests.test_assertNoResultSwallowsImmediateFailure.<locals>.raisesException  r  r   Nr  )r   r  r  r  s      @r   r  zLResultOfCoroutineAssertionsTests.test_assertNoResultSwallowsImmediateFailure  s     	 	 	 	 	 O	""""$ 	 	 	D	t33A6677777s   < 
A	A	r   ) r   r    r!   r+   r   rH   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  r  r$   r   r   r  r    s         VXXF	+&&Igi  G       

 
 

 
 
C C C
 
 

 
 

 
 
  $C C C  *C C C&V V V
 
 


 

 


 
 

 
 
4 4 4? ? ?"A A A$8 8 8 8 8r   r  c                   0    e Zd ZdZd Zd Zd Zd Zd ZdS )AssertionNamesTestszK
    Tests for consistency of naming within TestCase assertion methods
    c                 F    i t          | d           fdD             S )Nassertc                 V    g | ]%}|                     d           |dk    |         &S )Not_)r   ).0kdcts     r   
<listcomp>z3AssertionNamesTests._getAsserts.<locals>.<listcomp>  s3    LLL11<<+>+>L188A888r   )r   )r   r  s    @r   _getAssertszAssertionNamesTests._getAsserts  s4    $X...LLLLLLLLr   c                     |j         S r   )r   r   s     r   _namezAssertionNamesTests._name  s
    zr   c                     t          |                                           }t          t          | d                    }|                     ||                    |                     dS )a  
        The C{failUnless*} test methods are a subset of the C{assert*} test
        methods.  This is intended to ensure that methods using the
        I{failUnless} naming scheme are not added without corresponding methods
        using the I{assert} naming scheme.  The I{assert} naming scheme is
        preferred, and new I{assert}-prefixed methods may be added without
        corresponding I{failUnless}-prefixed methods.
        r   N)setr   r   rF   intersection)r   assertsfailUnlessess      r   test_failUnlessMatchesAssertz0AssertionNamesTests.test_failUnlessMatchesAssert  s^     d&&(())?4>>??w';';L'I'IJJJJJr   c                     t          t          j        d          }t          t          j        d          }|                     t	          || j                  t	          || j                             d S )N	assertNotro   )key)r   r   rT   rF   sortedr  )r   r  failIfss      r   test_failIf_matches_assertNotz1AssertionNamesTests.test_failIf_matches_assertNot  sk    !(">LL!(">II7
+++VG-L-L-L	
 	
 	
 	
 	
r   c           
      :   t          |                                           D ]\  }}t          |          s|                    d          rT|                     t          | |dz             | d| d           |                     |t          | |dz                        |                    d          re|                     t          | |d d                   | d|d d                     |                     |t          | |d d                              d S )NEqualsz but no Equals)varsitemscallableendswithr~   hasattrrF   r*  )r   r   r  s      r   test_equalSpellingz&AssertionNamesTests.test_equalSpelling  s/   ::++-- 	B 	BKD%E?? }}W%% CdSj 9 9d;S;SD;S;S;STTT  dSj(A(ABBB}}X&& Bd3B3i 8 8T:V:V4PSQSPS9:V:VWWW  d3B3i(@(@AAA	B 	Br   N)	r   r    r!   r+   r   r  r  r  r  r$   r   r   r  r    st         M M M
  K K K
 
 
	B 	B 	B 	B 	Br   r  c                   X    e Zd ZdZ edddd          Zd Zd Zd Zd Z	d	 Z
d
 Zd ZdS )CallDeprecatedTestsz\
    Test use of the L{SynchronousTestCase.callDeprecated} method with version objects.
    Twisted   r   c                     |                      | j        t          d           |                     |                                 g d           dS )zj
        callDeprecated calls a deprecated callable, suppressing the
        deprecation warning.
        r   zNo warnings should be shownN)callDeprecatedversion	oldMethodrF   r  r   s    r   $test_callDeprecatedSuppressesWarningz8CallDeprecatedTests.test_callDeprecatedSuppressesWarning  sI    
 	DL)U;;;++--r3PQQQQQr   c                 t    |                      | j        t          d          }|                     d|           dS )zn
        L{callDeprecated} actually calls the callable passed to it, and
        forwards the result.
        r   N)r  r   r!  rF   rG   s     r    test_callDeprecatedCallsFunctionz4CallDeprecatedTests.test_callDeprecatedCallsFunction  s9    
 $$T\9eDD'''''r   c                     d }|                      | j        | j        | j        |          }|                     d|z  t          |                     dS )zd
        L{callDeprecated} raises a test failure if the callable is not
        deprecated.
        c                      d S r   r$   r$   r   r   notDeprecatedzGCallDeprecatedTests.test_failsWithoutDeprecation.<locals>.notDeprecated  s    Dr   z%r is not deprecated.N)r   rE   r  r   rF   r#   )r   r'  r   s      r   test_failsWithoutDeprecationz0CallDeprecatedTests.test_failsWithoutDeprecation  sc    	 	 	 %%!4#6m
 
	 	0=@#i..QQQQQr   c                 D   t          dddd          }|                     | j        | j        |t          d          }|                     t          | j                  t          |                     |                     t          |          t          |                     dS )z
        callDeprecated raises a test failure if the callable was deprecated
        at a different version to the one expected.
        FoorK   r`   rb   r   N)	r   r   rE   r  r!  rj   r   r   r#   )r   differentVersionr   s      r   "test_failsWithIncorrectDeprecationz6CallDeprecatedTests.test_failsWithIncorrectDeprecation  s    
 #5!Q22%%!
 
	 	&t|44c)nnEEE&'788#i..IIIIIr   c                    t          dddd          }d } t          |          |          }|                     ||d           |                                 }|                     t          |          dd|            dS )	a:  
        L{callDeprecated} ignores all deprecations apart from the first.

        Multiple warnings are generated when a deprecated function calls
        another deprecated function. The first warning is the one generated by
        the explicitly called function. That's the warning that we care about.
        r*  rK   r`   rb   c                      t          |  S r   )r!  )argss    r   nestedDeprecationzECallDeprecatedTests.test_nestedDeprecation.<locals>.nestedDeprecation&  s    d##r      zUnexpected warnings: N)r   r   r  r  rF   rQ   )r   r+  r0  warningsShowns       r   test_nestedDeprecationz*CallDeprecatedTests.test_nestedDeprecation  s     #5!Q22	$ 	$ 	$ 9J'7889JKK,.?DDD
 **,,]++Q0W0W0WXXXXXr   c                 L    |                      | j        dft          d           dS )zj
        L{callDeprecated} can take a message argument used to check the warning
        emitted.
        	newMethodrK   N)r  r   oldMethodReplacedr   s    r   test_callDeprecationWithMessagez3CallDeprecatedTests.test_callDeprecationWithMessage3  s*    
 	T\;79JANNNNNr   c                    |                      | j        | j        | j        dft          d          }|                     t          | j                  t          |                     |                     dt          |                     dS )z|
        If the message passed to L{callDeprecated} doesn't match,
        L{callDeprecated} raises a test failure.
        zsomething.wrongrK   zplease use newMethod insteadN)r   rE   r  r   r6  rj   r   r#   r  s     r   $test_callDeprecationWithWrongMessagez8CallDeprecatedTests.test_callDeprecationWithWrongMessage:  s~    
 %%!\,-
 
	 	&t|44c)nnEEE4c)nnEEEEEr   N)r   r    r!   r+   r   r   r"  r$  r(  r,  r3  r7  r9  r$   r   r   r  r    s          giAq))GR R R( ( (R R RJ J J Y Y Y.O O OF F F F Fr   r  c                     | S )z(
    Deprecated method for testing.
    r$   r   s    r   r!  r!  J  s	    
 Hr   r5  )replacementc                     d| z  S )zh
    Another deprecated method, which has been deprecated in favor of the
    mythical 'newMethod'.
    r`   r$   r;  s    r   r6  r6  R  s     q5Lr   c                   F    e Zd ZdZ edddd          Zd Zd Zd Zd	 Z	d
S )!GetDeprecatedModuleAttributeTestsz
    Test L{SynchronousTestCase.getDeprecatedModuleAttribute}

    @ivar version: The version at which L{test_assertions.somethingOld}
        is marked deprecated.
    @type version: L{incremental.Version}
    BarrK   r`   rb   c                     |                      t          |                     t          d| j                             |                     g |                                            dS )z
        L{getDeprecatedModuleAttribute} returns the specified attribute and
        consumes the deprecation warning that generates.
        somethingOldNr   _somethingOldgetDeprecatedModuleAttributer   r   rF   r  r   s    r   test_deprecatedz1GetDeprecatedModuleAttributeTests.test_deprecatedf  se    
 	-- 	
 	
 	
 	T//1122222r   c           	          |                      t          |                     t          d| j        d                     |                     g |                                            dS )z
        The I{message} argument to L{getDeprecatedModuleAttribute} matches the
        prefix of the deprecation message.
        rB  zIt's old)r   NrC  r   s    r   test_messagez.GetDeprecatedModuleAttributeTests.test_messageu  sm    
 	--"	 .  	
 	
 	
 	T//1122222r   c                     |                      | j        | j        t          d| j        d           |                     g |                                            dS )z
        L{getDeprecatedModuleAttribute} fails the test if the I{message} isn't
        part of the deprecation message prefix.
        rB  zIt's shiny and newN)r   rE   rE  r   r   rF   r  r   s    r   test_messageMismatchz6GetDeprecatedModuleAttributeTests.test_messageMismatch  s`    
 	!-L 	
 	
 	
 	T//1122222r   c                 `    |                      | j        | j        t          d| j                   dS )z
        L{getDeprecatedModuleAttribute} fails the test when used to get an
        attribute that isn't actually deprecated.
        somethingNewN)r   rE   rE  r   r   r   s    r   test_notDeprecatedz4GetDeprecatedModuleAttributeTests.test_notDeprecated  s=    
 	!-L	
 	
 	
 	
 	
r   N)
r   r    r!   r+   r   r   rF  rH  rJ  rM  r$   r   r   r?  r?  [  sq          geQ1%%G3 3 33 3 3 3 3 3
 
 
 
 
r   r?  c                      dS )zj
    A deprecated module attribute. Used by
    L{GetDeprecatedModuleAttributeTests.test_deprecated}.
    Nr$   r$   r   r   rB  rB          r   zIt's old and clunkyrB  c                      dS )zy
    A module attribute that is not deprecated. Used by
    L{GetDeprecatedModuleAttributeTests.test_notDeprecated}.
    Nr$   r$   r   r   rL  rL    rO  r   ),r+   r   r9   r5  incrementalr   r   twisted.internet.deferr   r   r   twisted.python.deprecater   r	   twisted.python.failurer
   twisted.python.reflectr   r   r   twisted.python.utilr   twisted.trialr   r&   r   r/   rT   rV   rx   r   r-  r  r  r  r  r   r!  r6  r?  rB  rD  r   rL  r$   r   r   <module>rX     s  	 	      1 1 1 1 1 1 1 1 : : : : : : : : : : J J J J J J J J * * * * * *         
 - , , , , , " " " " " ", , , , ,< , , ,	 	 	 	 	 	 	 	3; 3; 3; 3; 3;v 3; 3; 3;lJ0 J0 J0 J0 J0x3 J0 J0 J0ZJ. J. J. J. J.h2 J. J. J.ZI
 I
 I
 I
 I
!= I
 I
 I
Xm4 m4 m4 m4 m4H8 m4 m4 m4`^8 ^8 ^8 ^8 ^8h: ^8 ^8 ^8BS8 S8 S8 S8 S8x'C S8 S8 S8l*B *B *B *B *B(6 *B *B *BZ`F `F `F `F `F(6 `F `F `FF '((  )( '[AAA  BAD
 D
 D
 D
 D
(D D
 D
 D
N     %-	      r   