Ë
    ojÿ}  ã                   óN  — d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dl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 d dlmZ d dlmZmZmZm Z  d dl!m"Z" d dl#m$Z$m%Z%  G d„ d«      Z& e
e$«       G d„ d«      «       Z' G d„ d«      Z( G d„ de(ejR                  «      Z* G d„ de(ejR                  «      Z+ G d„ d«      Z, G d„ de,ejR                  «      Z- G d„ de,ejR                  «      Z. G d „ d!e,ejR                  «      Z/ G d"„ d#ejR                  «      Z0 G d$„ d%ejR                  «      Z1 G d&„ d'ejR                  «      Z2 G d(„ d)e2«      Z3 G d*„ d+ejh                  «      Z5 G d,„ d-ejR                  «      Z6 G d.„ d/ejR                  «      Z7 G d0„ d1«      Z8 G d2„ d3e8e7«      Z9 G d4„ d5e8e7«      Z: G d6„ d7ejR                  «      Z; G d8„ d9ejR                  «      Z< G d:„ d;ejR                  «      Z= G d<„ d=ejR                  «      Z> G d>„ d?ejR                  «      Z?y)@é    N)ÚStringIO)ÚList)Úimplementer)ÚverifyObject)Úplugin)Údefer)Útwisted_trial)ÚfailureÚlogÚreflect)ÚFilePath©ÚnamedAny)Útrial)ÚreporterÚrunnerÚunittestÚutil)Ú _ForceGarbageCollectionDecorator)Ú	IReporterÚ	ITestCasec                   ó   — e Zd Zd„ Zd„ Zy)ÚCapturingDebuggerc                 ó   — g | _         y ©N)Ú_calls©Úselfs    ú@/usr/lib/python3/dist-packages/twisted/trial/test/test_runner.pyÚ__init__zCapturingDebugger.__init__   s	   € Øˆ�ó    c                 óV   — | j                   j                  d«        |d   |dd  i |¤Ž y )NÚruncallr   é   ©r   Úappend)r   ÚargsÚkwargss      r   r#   zCapturingDebugger.runcall"   s-   € Ø�‰×Ñ˜9Ô%ØˆˆQ‰��a�b�Ð$˜VÓ$r!   N)Ú__name__Ú
__module__Ú__qualname__r    r#   © r!   r   r   r      s   „ òó%r!   r   c                   ór   — e Zd ZdZdZdZdZdZdZdd„Z	d„ Z
d„ Zd„ Zd„ Zd„ Zd	„ Zd
„ Zdd„Zdd„Zd„ Zd„ Zy)ÚCapturingReporterzC
    Reporter that keeps a log of all actions performed on it.
    Nc                 óX   — g | _         d| _        || _        || _        || _        || _        y)z.
        Create a capturing reporter.
        FN)r   Ú
shouldStopÚ_streamÚ	_tbformatÚ	_rterrorsÚ
_publisher)r   ÚstreamÚtbformatÚrterrorsÚ	publishers        r   r    zCapturingReporter.__init__3   s.   € ð ˆŒØˆŒØˆŒØ!ˆŒØ!ˆŒØ#ˆ�r!   c                 ó:   — | j                   j                  d«       y)z‰
        Report the beginning of a run of a single test method
        @param method: an object that is adaptable to ITestMethod
        Ú	startTestNr%   ©r   Úmethods     r   r:   zCapturingReporter.startTest>   s   € ð
 	�‰×Ñ˜;Õ'r!   c                 ó:   — | j                   j                  d«       y)z}
        Report the status of a single test method
        @param method: an object that is adaptable to ITestMethod
        ÚstopTestNr%   r;   s     r   r>   zCapturingReporter.stopTestE   s   € ð
 	�‰×Ñ˜:Õ&r!   c                 ó:   — | j                   j                  d«       y)zƒcalled when the reactor has been left in a 'dirty' state
        @param errs: a list of L{twisted.python.failure.Failure}s
        ÚcleanupErrorNr%   )r   Úerrss     r   ÚcleanupErrorszCapturingReporter.cleanupErrorsL   s   € ð 	�‰×Ñ˜>Õ*r!   c                 ó:   — | j                   j                  d«       y )NÚ
addSuccessr%   ©r   Útests     r   rD   zCapturingReporter.addSuccessR   s   € Ø�‰×Ñ˜<Õ(r!   c                  ó   — y)z@
        Do nothing. These tests don't care about done.
        Nr,   r   s    r   ÚdonezCapturingReporter.doneU   ó   � r!   c                  ó   — y)zD
        Do nothing. These tests don't care about addError.
        Nr,   ©r   rF   Úerrors      r   ÚaddErrorzCapturingReporter.addErrorZ   rI   r!   c                  ó   — y)zF
        Do nothing. These tests don't care about addFailure.
        Nr,   )r   rF   r
   s      r   Ú
addFailurezCapturingReporter.addFailure_   rI   r!   c                  ó   — y)zN
        Do nothing. These tests don't care about addExpectedFailure.
        Nr,   )r   rF   r
   Útodos       r   ÚaddExpectedFailurez$CapturingReporter.addExpectedFailured   rI   r!   c                  ó   — y)zP
        Do nothing. These tests don't care about addUnexpectedSuccess.
        Nr,   )r   rF   rQ   s      r   ÚaddUnexpectedSuccessz&CapturingReporter.addUnexpectedSuccessi   rI   r!   c                  ó   — y)zC
        Do nothing. These tests don't care about addSkip.
        Nr,   )r   rF   Úreasons      r   ÚaddSkipzCapturingReporter.addSkipn   rI   r!   c                  ó   — y)zI
        Do nothing. These tests don't care about wasSuccessful.
        Nr,   r   s    r   ÚwasSuccessfulzCapturingReporter.wasSuccessfuls   rI   r!   )NNNNr   )r)   r*   r+   Ú__doc__r5   r6   r'   Ú	separatorÚtestsRunr    r:   r>   rB   rD   rH   rM   rO   rR   rT   rW   rY   r,   r!   r   r.   r.   '   s^   „ ñð €FØ€HØ€DØ€IØ€Hó	$ò(ò'ò+ò)òò
ò
ó
ó
ò
ó
r!   r.   c                   ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)ÚTrialRunnerTestsMixinz9
    Mixin defining tests for L{runner.TrialRunner}.
    c                  ó   — y)z=
        Empty test method, used by the other tests.
        Nr,   r   s    r   Ú
test_emptyz TrialRunnerTestsMixin.test_empty~   rI   r!   c                 ó6   — t         j                  j                  S r   )r   ÚtheLogPublisherÚ	observersr   s    r   Ú_getObserversz#TrialRunnerTestsMixin._getObserversƒ   s   € Ü×"Ñ"×,Ñ,Ð,r!   c                 óÖ   — t        | j                  «       «      }| j                  j                  | j                  «       t        | j                  «       «      }| j                  ||«       y)zn
        Any log system observers L{TrialRunner.run} adds are removed by the
        time it returns.
        N)Úlenrd   r   ÚrunrF   ÚassertEqual)r   ÚoriginalCountÚnewCounts      r   Útest_addObserversz'TrialRunnerTestsMixin.test_addObservers†   sN   € ô
 ˜D×.Ñ.Ó0Ó1ˆØ�‰�‰˜Ÿ	™	Ô"Ü�t×)Ñ)Ó+Ó,ˆØ×Ñ˜ =Õ1r!   c                 óp  — t        | j                  j                  «      j                  | j                  j                  «      }t        d«      D ]f  }| j                  j                  | j                  «       |j                  «        | j                  |j                  «       «       |j                  «        Œh y)z=
        Test that a new file is opened on each run.
        é   N)r   r   ÚworkingDirectoryÚchildÚlogfileÚrangerg   rF   ÚrestatÚ
assertTrueÚexistsÚremove)r   ÚlogPathÚis      r   Útest_logFileAlwaysActivez.TrialRunnerTestsMixin.test_logFileAlwaysActive�   s}   € ô ˜4Ÿ;™;×7Ñ7Ó8×>Ñ>¸t¿{¹{×?RÑ?RÓSˆä�q“ò 	ˆAØ�K‰K�O‰O˜DŸI™IÔ&Ø�N‰NÔØ�O‰O˜GŸN™NÓ,Ô-ð �N‰NÕñ	r!   N)r)   r*   r+   rZ   r`   rd   rk   rx   r,   r!   r   r^   r^   y   s   „ ñòò
-ò2ór!   r^   c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚTrialRunnerTestszm
    Tests for L{runner.TrialRunner} with the feature to turn unclean errors
    into warnings disabled.
    c                 ó–   — t        «       | _        t        j                  t        | j                  ¬«      | _        t        d«      | _        y )N©r5   r`   ©r   r5   r   ÚTrialRunnerr.   rz   rF   r   s    r   ÚsetUpzTrialRunnerTests.setUp¥   s0   € Ü“jˆŒÜ×(Ñ(Ô):À4Ç;Á;ÔOˆŒÜ$ \Ó2ˆ�	r!   c                 óx   — | j                   j                  «       }| j                  |j                  t        «       y)z˜
        The reporter constructed by L{runner.TrialRunner} is passed
        L{twisted.python.log} as the value for the C{publisher} parameter.
        N)r   Ú_makeResultÚassertIdenticalr4   r   ©r   Úresults     r   Útest_publisherzTrialRunnerTests.test_publisherª   s,   € ð
 —‘×(Ñ(Ó*ˆØ×Ñ˜V×.Ñ.´Õ4r!   N)r)   r*   r+   rZ   r   r…   r,   r!   r   rz   rz   Ÿ   s   „ ñò
3ó
5r!   rz   c                   ó   — e Zd ZdZd„ Zy)Ú+TrialRunnerWithUncleanWarningsReporterTestsza
    Tests for the TrialRunner's interaction with an unclean-error suppressing
    reporter.
    c                 ó˜   — t        «       | _        t        j                  t        | j                  d¬«      | _        t        d«      | _        y )NT©r5   ÚuncleanWarningsr`   r}   r   s    r   r   z1TrialRunnerWithUncleanWarningsReporterTests.setUp»   s6   € Ü“jˆŒÜ×(Ñ(Ü d§k¡kÀ4ô
ˆŒô % \Ó2ˆ�	r!   N©r)   r*   r+   rZ   r   r,   r!   r   r‡   r‡   ³   s   „ ñó
3r!   r‡   c                   ó.   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚDryRunMixinze
    Mixin for testing that 'dry run' mode works with various
    L{pyunit.TestCase} subclasses.
    c                 óÖ   — g | _         t        «       | _        t        j                  t
        t        j                  j                  | j                  ¬«      | _        | j                  «        y )Nr|   )r   r   r5   r   r~   r.   ÚDRY_RUNÚmakeTestFixturesr   s    r   r   zDryRunMixin.setUpÉ   sI   € ØˆŒÜ“jˆŒÜ×(Ñ(Üœv×1Ñ1×9Ñ9À$Ç+Á+ô
ˆŒð 	×ÑÕr!   c                  ó   — y)zh
        Set C{self.test} and C{self.suite}, where C{self.suite} is an empty
        TestSuite.
        Nr,   r   s    r   r�   zDryRunMixin.makeTestFixturesÑ   rI   r!   c                 ó–   — | j                   j                  t        j                  «       «      }| j                  |j                  g «       y)zf
        If there are no tests, the reporter should not receive any events to
        report.
        N)r   rg   Ú	TestSuiterh   r   rƒ   s     r   r`   zDryRunMixin.test_empty×   s3   € ð
 —‘—‘¤×!1Ñ!1Ó!3Ó4ˆØ×Ñ˜Ÿ™¨Õ+r!   c                 óŠ   — | j                   j                  | j                  «      }| j                  |j                  g d¢«       y)z†
        If we are running a single test, check the reporter starts, passes and
        then stops the test during a dry run.
        ©r:   rD   r>   N)r   rg   rF   rh   r   rƒ   s     r   Útest_singleCaseReportingz$DryRunMixin.test_singleCaseReportingß   s/   € ð
 —‘—‘ §¡Ó+ˆØ×Ñ˜Ÿ™Ò(OÕPr!   c                 ó†   — | j                   j                  | j                  «       | j                  | j                  g «       y)zT
        When we are doing a dry run, the tests should not actually be run.
        N)r   rg   rF   rh   r   r   s    r   Útest_testsNotRunzDryRunMixin.test_testsNotRunç   s,   € ð 	�‰�‰˜Ÿ	™	Ô"Ø×Ñ˜Ÿ™ 2Õ&r!   N)	r)   r*   r+   rZ   r   r�   r`   r–   r˜   r,   r!   r   r�   r�   Ã   s!   „ ñò
 òò,òQó'r!   r�   c                   ó   — e Zd ZdZd„ Zy)ÚSynchronousDryRunTestszS
    Check that 'dry run' mode works well with trial's L{SynchronousTestCase}.
    c                 ó‚   —  G d„ dt         j                  «      } |d«      | _        t        j                  «       | _        y )Nc                   ó   — e Zd Zd„ Zy)ú;SynchronousDryRunTests.makeTestFixtures.<locals>.PyunitCasec                  ó   — y r   r,   r   s    r   Útest_foozDSynchronousDryRunTests.makeTestFixtures.<locals>.PyunitCase.test_fooö   ó   € Ør!   N©r)   r*   r+   rŸ   r,   r!   r   Ú
PyunitCaser�   õ   ó   „ ór!   r¢   rŸ   )r   ÚSynchronousTestCaserF   Úpyunitr“   Úsuite©r   r¢   s     r   r�   z'SynchronousDryRunTests.makeTestFixturesô   s2   € ô	œ×5Ñ5ô 	ñ ˜zÓ*ˆŒ	Ü×%Ñ%Ó'ˆ�
r!   N©r)   r*   r+   rZ   r�   r,   r!   r   rš   rš   ï   ó   „ ñó(r!   rš   c                   ó   — e Zd ZdZd„ Zy)ÚDryRunTestsz@
    Check that 'dry run' mode works well with Trial tests.
    c                 óˆ   ‡ —  G ˆ fd„dt         j                  «      } |d«      ‰ _        t        j                  «       ‰ _        y )Nc                   ó   •— e Zd Zˆ fd„Zy)ú.DryRunTests.makeTestFixtures.<locals>.MockTestc                 ó<   •— ‰j                   j                  d«       y )NrŸ   )r   r&   )rF   r   s    €r   rŸ   z7DryRunTests.makeTestFixtures.<locals>.MockTest.test_foo  s   ø€ Ø—‘—‘ 
Õ+r!   Nr¡   r   s   €r   ÚMockTestr®     s   ø„ õ,r!   r°   rŸ   )r   ÚTestCaserF   r   r“   r¦   )r   r°   s   ` r   r�   zDryRunTests.makeTestFixtures  s3   ø€ ö	,”x×(Ñ(ô 	,ñ ˜ZÓ(ˆŒ	Ü×%Ñ%Ó'ˆ�
r!   Nr¨   r,   r!   r   r«   r«   ý   r©   r!   r«   c                   ó   — e Zd ZdZd„ Zy)ÚPyUnitDryRunTestszJ
    Check that 'dry run' mode works well with stdlib unittest tests.
    c                 ó‚   —  G d„ dt         j                  «      } |d«      | _        t        j                  «       | _        y )Nc                   ó   — e Zd Zd„ Zy)ú6PyUnitDryRunTests.makeTestFixtures.<locals>.PyunitCasec                  ó   — y r   r,   r   s    r   rŸ   z?PyUnitDryRunTests.makeTestFixtures.<locals>.PyunitCase.test_foo  r    r!   Nr¡   r,   r!   r   r¢   r¶     r£   r!   r¢   rŸ   )r¥   r±   rF   r“   r¦   r§   s     r   r�   z"PyUnitDryRunTests.makeTestFixtures  s0   € ô	œŸ™ô 	ñ ˜zÓ*ˆŒ	Ü×%Ñ%Ó'ˆ�
r!   Nr¨   r,   r!   r   r³   r³     r©   r!   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„ Zd„ Zd„ Z e«       Zd„ Zd„ Zy)ÚRunnerTestsc                 óX  ‡ ‡— t        j                  «       ‰ _        t        j                  t
        «      j                  d«      }dj                  |d d «      }|d   }t        j                  d|ddd |¬«      gŠˆˆ fd„}t        j                  ‰ _        |t        _        g d¢d	z  ‰ _        y )
Nú.éÿÿÿÿzTest Helper ReporterzUtility for unit testing.Ú	capturing)ÚdescriptionÚlongOptÚshortOptÚklassc                 ót   •— ‰j                  | t        «       ‰t         ‰j                  | g|¢­i |¤Ž«      z   S r   )rh   r   ÚlistÚoriginal)ÚifaceÚaÚkwÚpluginsr   s      €€r   Ú
getPluginsz%RunnerTests.setUp.<locals>.getPlugins/  s8   ø€ Ø×Ñ˜U¤IÔ.ØœT - $§-¡-°Ð"@¸Ò"@¸RÑ"@ÓAÑAÐAr!   r•   é
   )r   ÚOptionsÚconfigr   Úqualr.   ÚsplitÚjoinr	   Ú	_Reporterr   rÉ   rÄ   ÚstandardReport)r   ÚpartsÚpackagerÁ   rÉ   rÈ   s   `    @r   r   zRunnerTests.setUp  s�   ù€ Ü—m‘m“oˆŒô —‘Ô.Ó/×5Ñ5°cÓ:ˆØ—(‘(˜5  "˜:Ó&ˆØ�b‘	ˆä×#Ñ#Ø&ØØ7Ø#ØØôð	
ˆõ	Bô ×)Ñ)ˆŒØ&ŒÔò
 FÈÑJˆÕr!   c                 ó.   — | j                   t        _        y r   )rÄ   r   rÉ   r   s    r   ÚtearDownzRunnerTests.tearDown;  s   € Ø ŸM™MŒÕr!   c                 ó:   — | j                   j                  |«       y r   )rÌ   ÚparseOptions©r   r'   s     r   r×   zRunnerTests.parseOptions>  s   € Ø�‰× Ñ  Õ&r!   c                 ób   — t        j                  | j                  «      }t        «       |_        |S r   )r   Ú_makeRunnerrÌ   r   r5   )r   Úrs     r   Ú	getRunnerzRunnerTests.getRunnerA  s$   € Ü×Ñ˜dŸk™kÓ*ˆÜ“:ˆŒØˆr!   c                 óº   — | j                  g «       | j                  d   }| j                  «       }| j                  | |j                  «       j
                  «       y ©Nr   )r×   rÌ   rÜ   rh   r�   Ú	__class__)r   r„   r   s      r   Útest_runner_can_get_reporterz(RunnerTests.test_runner_can_get_reporterF  sL   € Ø×Ñ˜"ÔØ—‘˜ZÑ(ˆØ—‘Ó!ˆØ×Ñ˜Ð!3 ×!3Ñ!3Ó!5×!?Ñ!?Õ@r!   c                 óº   — | j                  g «       | j                  «       } |j                  «       }| j                  |j                  | j
                  d   «       y rÞ   )r×   rÜ   r�   rh   rß   rÌ   ©r   r   r„   s      r   Útest_runner_get_resultz"RunnerTests.test_runner_get_resultL  sK   € Ø×Ñ˜"ÔØ—‘Ó!ˆØ#�×#Ñ#Ó%ˆØ×Ñ˜×)Ñ)¨4¯;©;°zÑ+BÕCr!   c                 ó¤   — | j                  g «       | j                  «       }| j                   |j                  «       t        j
                  «       y)zÕ
        By default Trial sets the 'uncleanWarnings' option on the runner to
        False. This means that dirty reactor errors will be reported as
        errors. See L{test_reporter.DirtyReactorTests}.
        N)r×   rÜ   ÚassertNotIsInstancer�   r   ÚUncleanWarningsReporterWrapper©r   r   s     r   Ú test_uncleanWarningsOffByDefaultz,RunnerTests.test_uncleanWarningsOffByDefaultR  sB   € ð 	×Ñ˜"ÔØ—‘Ó!ˆØ× Ñ ØˆF×ÑÓ ¤(×"IÑ"Iõ	
r!   c                 ó¦   — | j                  dg«       | j                  «       }| j                   |j                  «       t        j
                  «       y)zï
        Specifying '--unclean-warnings' on the trial command line will cause
        reporters to be wrapped in a device which converts unclean errors to
        warnings.  See L{test_reporter.DirtyReactorTests} for implications.
        z--unclean-warningsN)r×   rÜ   ÚassertIsInstancer�   r   ræ   rç   s     r   Útest_getsUncleanWarningsz$RunnerTests.test_getsUncleanWarnings^  sF   € ð 	×ÑÐ/Ð0Ô1Ø—‘Ó!ˆØ×ÑØˆF×ÑÓ ¤(×"IÑ"Iõ	
r!   c                 ó‚   — | j                  ddg«       | j                  «       }| j                  |j                  d«       y )Nú--temp-directoryÚ	some_path)r×   rÜ   rh   rn   rç   s     r   Útest_runner_working_directoryz)RunnerTests.test_runner_working_directoryj  s8   € Ø×ÑÐ-¨{Ð;Ô<Ø—‘Ó!ˆØ×Ñ˜×0Ñ0°+Õ>r!   c                 óÂ  ‡‡‡‡— | j                  g «       | j                  t        j                  t        j                  «       «       t        | j                  «       «      Š‰j                  «        t        j                  ‰j                  «       | j                  «       }| j                  «       Ši Š G ˆˆˆˆfd„dt        j                  «      Š|j                   ‰d«      «      }|j                  |j                  z   }|r| j                  |d   d   «       | j!                  ‰‰j#                  d«      j                  ‰j#                  d«      j                  dœ«       y	)
zÙ
        If no working directory is explicitly specified and the default
        working directory is in use by another runner, L{TrialRunner.run}
        selects a different default working directory to use.
        c                   ó(   •— e Zd Zˆ ˆˆˆfd„Zˆfd„Zy)úKRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCasec                 óä   •— t        j                  «       x‰d<   }t        j                  ‰j                  «       | j	                  t         j                  |«       ‰j                   ‰d«      «       y)zÕ
                Start a second test run which will have a default working
                directory which is the same as the working directory of the
                test run already in progress.
                Ú
concurrentÚtest_secondN)ÚosÚgetcwdÚchdirÚpathÚ
addCleanuprg   )r   ÚsubsequentDirectoryÚConcurrentCaseÚrunDirectoryÚsecondRunnerÚwheres     €€€€r   Ú
test_firstzVRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCase.test_firstˆ  sS   ø€ ô =?¿I¹I»KÐG��lÑ#Ð&9Ü—‘˜×*Ñ*Ô+Ø—‘¤§¡Ð*=Ô>à× Ñ ¡°Ó!>Õ?r!   c                 ó4   •— t        j                  «       ‰d<   y)zR
                Record the working directory for later analysis.
                ÚrecordN)rö   r÷   )r   rÿ   s    €r   rõ   zWRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCase.test_second–  s   ø€ ô #%§)¡)£+��h’r!   N)r)   r*   r+   r   rõ   )rü   rý   rþ   rÿ   s   €€€€r   rü   rò   ‡  s   ø„ ÷@õ.r!   rü   r   r   r$   Ú_trial_tempz_trial_temp-1)rô   r  N)r×   rú   rö   rø   r÷   r   ÚmktempÚmakedirsrù   rÜ   r   r¤   rg   ÚerrorsÚfailuresÚfailrh   ro   )r   ÚfirstRunnerr„   Úbadrü   rý   rþ   rÿ   s       @@@@r   Ú'test_concurrentImplicitWorkingDirectoryz3RunnerTests.test_concurrentImplicitWorkingDirectoryo  s  û€ ð 	×Ñ˜"Ôð 	�‰œŸ™¤"§)¡)£+Ô.ô
   §¡£Ó.ˆØ×ÑÔÜ
�‰�×"Ñ"Ô#à—n‘nÓ&ˆØ—~‘~Ó'ˆàˆ÷	.ñ 	.œX×9Ñ9ô 	.ð* —‘¡°Ó!=Ó>ˆØ�m‰m˜fŸo™oÑ-ˆÙØ�I‰I�c˜!‘f˜Q‘iÔ Ø×ÑØà*×0Ñ0°Ó?×DÑDØ&×,Ñ,¨_Ó=×BÑBñõ	
r!   c                 óø  ‡‡— | j                  dt        j                  j                  | j	                  «       «      g«       t        j
                  «       }| j                  t        j                  |«       | j                  «       }| j                  «       Š G ˆˆfd„dt        j                  «      Š|j                   ‰d«      «      }|j                  |j                  z   }|r| j                  |d   d   «       yy)z•
        If a working directory which is already in use is explicitly specified,
        L{TrialRunner.run} raises L{_WorkingDirectoryBusy}.
        rí   c                   ó    •— e Zd Zˆ ˆfd„Zd„ Zy)úKRunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCasec                 óh   •— | j                  t        j                  ‰j                   ‰d«      «       y)zŸ
                Try to start another runner in the same working directory and
                assert that it raises L{_WorkingDirectoryBusy}.
                Útest_failureN)ÚassertRaisesr   Ú_WorkingDirectoryBusyrg   )r   rü   rþ   s    €€r   Útest_concurrentz[RunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCase.test_concurrent¶  s-   ø€ ð
 ×!Ñ!Ü×.Ñ.Ø ×$Ñ$Ù" >Ó2õr!   c                 ó&   — | j                  d«       y)zE
                Should not be called, always fails.
                z$test_failure should never be called.N)r  r   s    r   r  zXRunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCase.test_failureÁ  s   € ð —	‘	Ð@ÕAr!   N)r)   r*   r+   r  r  )rü   rþ   s   €€r   rü   r  µ  s   ø„ õ	óBr!   rü   r  r   r$   N)r×   rö   rù   Úabspathr  r÷   rú   rø   rÜ   r   r¤   rg   r  r  r  )r   ÚinitialDirectoryr	  r„   r
  rü   rþ   s        @@r   Ú'test_concurrentExplicitWorkingDirectoryz3RunnerTests.test_concurrentExplicitWorkingDirectory¨  s»   ù€ ð
 	×ÑÐ-¬r¯w©w¯©¸t¿{¹{»}Ó/MÐNÔOäŸ9™9›;ÐØ�‰œŸ™Ð"2Ô3à—n‘nÓ&ˆØ—~‘~Ó'ˆ÷	BœX×9Ñ9ô 	Bð$ —‘¡Ð0AÓ!BÓCˆØ�m‰m˜fŸo™oÑ-ˆÙØ�I‰I�c˜!‘f˜Q‘iÕ ð r!   c                 ó&  — | j                  d| j                  «       dddg«       | j                  «       }t        j                  «       }|j                  dd«      }|j                  |«      }| j                  | j                  |j                  «       y )Nrí   ú
--reporterr½   útwisted.trial.test.sampleT)
r×   r  rÜ   r   Ú
TestLoaderÚ
loadByNamerg   rh   rÑ   r   )r   Ú	my_runnerÚloaderr¦   r„   s        r   Útest_runner_normalzRunnerTests.test_runner_normalÌ  s�   € Ø×Ñà"Ø—‘“ØØØ+ðô	
ð —N‘NÓ$ˆ	Ü×"Ñ"Ó$ˆØ×!Ñ!Ð"=¸tÓDˆØ—‘˜uÓ%ˆØ×Ñ˜×,Ñ,¨f¯m©mÕ<r!   c                 óp   — t        j                  «       }|j                  dd«      }|j                  |«      S )Nr  T)r   r  r  rg   )r   r  r  r¦   s       r   ÚrunSampleSuitezRunnerTests.runSampleSuiteÜ  s2   € Ü×"Ñ"Ó$ˆØ×!Ñ!Ð"=¸tÓDˆØ�}‰}˜UÓ#Ð#r!   c                 ó  — | j                  g d¢«       | j                  «       }t        «       x}|_        | j	                  |«      }| j                  | j                  |j                  «       | j                  dg|j                  «       y)zL
        Trial uses its debugger if the `--debug` option is passed.
        )r  r½   ú--debugr  r#   N)r×   rÜ   r   Údebuggerr!  rh   rÑ   r   )r   r  r$  r„   s       r   Útest_runnerDebugzRunnerTests.test_runnerDebugá  ss   € ð 	×ÑÚOô	
ð —N‘NÓ$ˆ	Ü(9Ó(;Ð;ˆ�9Ô%Ø×$Ñ$ YÓ/ˆØ×Ñ˜×,Ñ,¨f¯m©mÔ<Ø×Ñ˜)˜ h§o¡oÕ6r!   c                 ó0  ‡ — ‰ j                  ddg«       t        d«      }|j                  «        d‰ _        ˆ fd„}‰ j	                  t
        j                  d|«       ‰ j                  ‰ j                  «       «       ‰ j                  ‰ j                  «       y)zL
        Trial uses pdb if no debugger is specified by `--debugger`
        r#  r  ÚpdbrcFc                 ó   •— d‰_         y ©NT©Úruncall_called©Úpdbr¦   r„   r   s      €r   r#   z=RunnerTests.test_runnerDebuggerDefaultsToPdb.<locals>.runcallø  ó   ø€ Ø"&ˆDÕr!   r#   N)
r×   r   Útouchr+  Úpatchr-  ÚPdbr!  rÜ   rs   )r   Ú	pdbrcFiler#   s   `  r   Ú test_runnerDebuggerDefaultsToPdbz,RunnerTests.test_runnerDebuggerDefaultsToPdbî  sw   ø€ ð 	×Ñ˜9Ð&AÐBÔCÜ˜WÓ%ˆ	Ø�‰Ôà#ˆÔô	'ð 	�
‰
”3—7‘7˜I wÔ/à×Ñ˜DŸN™NÓ,Ô-à�‰˜×+Ñ+Õ,r!   c                 óú   ‡ — ‰ j                  g d¢«       d‰ _        ˆ fd„}‰ j                  t        j                  d|«       ‰ j                  ‰ j                  «       «       ‰ j                  ‰ j                  «       y)zU
        Trial uses pdb if pdb is passed explicitly to the `--debugger` arg.
        )r  r½   ú
--debuggerr-  r#  r  Fc                 ó   •— d‰_         y r)  r*  r,  s      €r   r#   zGRunnerTests.test_runnerDebuggerWithExplicitlyPassedPdb.<locals>.runcall  r.  r!   r#   N)r×   r+  r0  r-  r1  r!  rÜ   rs   )r   r#   s   ` r   Ú*test_runnerDebuggerWithExplicitlyPassedPdbz6RunnerTests.test_runnerDebuggerWithExplicitlyPassedPdb  sd   ø€ ð 	×Ñòô		
ð $ˆÔô	'ð 	�
‰
”3—7‘7˜I wÔ/à×Ñ˜DŸN™NÓ,Ô-à�‰˜×+Ñ+Õ,r!   c                 ó  — | j                  g d¢«       | j                  «       }| j                  |«      }| j                  | j                  |j
                  «       | j                  dg|j                  j
                  «       y)zM
        Trial uses specified debugger if the debugger is available.
        )r  r½   r5  z4twisted.trial.test.test_runner.RunnerTests.cdebuggerr#  r  r#   N)r×   rÜ   r!  rh   rÑ   r   r$  )r   r  r„   s      r   Útest_runnerDebuggerzRunnerTests.test_runnerDebugger  sm   € ð 	×Ñòô		
ð —N‘NÓ$ˆ	Ø×$Ñ$ YÓ/ˆØ×Ñ˜×,Ñ,¨f¯m©mÔ<Ø×Ñ˜)˜ i×&8Ñ&8×&?Ñ&?Õ@r!   c                 óª   — | j                  dg«       | j                  «       } |j                  «       }| j                  |t        j
                  «       y)z•
        If trial was passed the C{--exitfirst} option, the constructed test
        result object is wrapped with L{reporter._ExitWrapper}.
        z--exitfirstN)r×   rÜ   r�   rê   r   Ú_ExitWrapperrâ   s      r   Útest_exitfirstzRunnerTests.test_exitfirst0  sF   € ð
 	×Ñ˜=˜/Ô*Ø—‘Ó!ˆØ#�×#Ñ#Ó%ˆØ×Ñ˜f¤h×&;Ñ&;Õ<r!   N)r)   r*   r+   r   rÕ   r×   rÜ   rà   rã   rè   rë   rï   r  r  r  r!  r%  r3  r7  r   Ú	cdebuggerr9  r<  r,   r!   r   r¹   r¹     sm   „ òKòB*ò'òò
AòDò

ò

ò?ò
7
òr"!òH=ò $ò
7ò-ò&-ñ4 "Ó#€IòAó&=r!   r¹   c                   ó   — e Zd Zd„ Zy)ÚTrialSuiteTestsc                 ó   — t        d«       y )Nztwisted.trial.runner.TrialSuiter   r   s    r   Útest_importszTrialSuiteTests.test_imports<  s   € äÐ2Õ3r!   N)r)   r*   r+   rA  r,   r!   r   r?  r?  ;  s   „ ó4r!   r?  c                   óT   — e Zd Z G d„ dej                  «      Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y)	ÚUntilFailureTestsc                   ó,   — e Zd ZU dZg Zed   ed<   d„ Zy)úUntilFailureTests.FailAfterzC
        A test case that fails when run 3 times in a row.
        NÚcountc                 óŽ   — | j                   j                  d «       t        | j                   «      dk(  r| j                  d«       y y )Né   zCount reached 3)rF  r&   rf   r  r   s    r   rŸ   z$UntilFailureTests.FailAfter.test_fooI  s6   € Ø�J‰J×Ñ˜dÔ#Ü�4—:‘:‹ !Ò#Ø—	‘	Ð+Õ,ð $r!   )r)   r*   r+   rZ   rF  r   Ú__annotations__rŸ   r,   r!   r   Ú	FailAfterrE  B  s   … ñ	ð ˆˆt�D‰zÓó	-r!   rJ  c                 óè   — g t         j                  _        t         j                  d«      | _        t	        «       | _        t        j                  t        j                  | j
                  ¬«      | _        y )NrŸ   r|   )
rC  rJ  rF  rF   r   r5   r   r~   r   ÚReporterr   s    r   r   zUntilFailureTests.setUpN  sJ   € Ø,.Ô×#Ñ#Ô)Ü%×/Ñ/°
Ó;ˆŒ	Ü“jˆŒÜ×(Ñ(¬×):Ñ):À4Ç;Á;ÔOˆ�r!   c                 ó  — | j                   j                  | j                  «      }| j                  |j                  d«       | j                  |j                  «       «       | j                  | j                  |«      d«       y)zl
        Test that the runUntilFailure method of the runner actually fail after
        a few runs.
        r$   N)r   ÚrunUntilFailurerF   rh   r\   ÚassertFalserY   Ú_getFailuresrƒ   s     r   Útest_runUntilFailurez&UntilFailureTests.test_runUntilFailureT  sb   € ð
 —‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,Ø×Ñ˜×-Ñ-Ó/Ô0Ø×Ñ˜×*Ñ*¨6Ó2°AÕ6r!   c                 ó,   — t        |j                  «      S )zL
        Get the number of failures that were reported to a result.
        )rf   r  rƒ   s     r   rP  zUntilFailureTests._getFailures^  s   € ô �6—?‘?Ó#Ð#r!   c                 ó@  ‡— g Šˆfd„}| j                  t        d|«       | j                  j                  | j                  «      }| j                  |j                  d«       | j                  t        ‰«      d«       | j                  ‰| j                  t        fg«       y)z�
        C{runUntilFailure} doesn't decorate the tests uselessly: it does it one
        time when run starts, but not at each turn.
        c                 ó.   •— ‰j                  | |f«       | S r   ©r&   ©rF   Ú	interfaceÚ	decorateds     €r   Údecoratez@UntilFailureTests.test_runUntilFailureDecorate.<locals>.decoratek  ó   ø€ Ø×Ñ˜d IÐ.Ô/ØˆKr!   rY  r$   N)	r0  r   r   rN  rF   rh   r\   rf   r   ©r   rY  r„   rX  s      @r   Útest_runUntilFailureDecoratez.UntilFailureTests.test_runUntilFailureDecorated  s}   ø€ ð
 ˆ	ô	ð 	�
‰
”8˜Z¨Ô2Ø—‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,à×Ñœ˜Y›¨Ô+Ø×Ñ˜ d§i¡i´Ð%;Ð$<Õ=r!   c                 ó„  ‡— g Šˆfd„}| j                  t        d|«       d| j                  _        | j                  j	                  | j
                  «      }| j                  |j                  d«       | j                  t        ‰«      d«       | j                  ‰| j
                  t        f| j
                  t        fg«       y)z‹
        C{runUntilFailure} applies the force-gc decoration after the standard
        L{ITestCase} decoration, but only one time.
        c                 ó.   •— ‰j                  | |f«       | S r   rU  rV  s     €r   rY  zGUntilFailureTests.test_runUntilFailureForceGCDecorate.<locals>.decorate}  rZ  r!   rY  Tr$   rm   N)r0  r   r   Ú_forceGarbageCollectionrN  rF   rh   r\   rf   r   r   r[  s      @r   Ú#test_runUntilFailureForceGCDecoratez5UntilFailureTests.test_runUntilFailureForceGCDecoratev  s™   ø€ ð
 ˆ	ô	ð 	�
‰
”8˜Z¨Ô2Ø.2ˆ�‰Ô+Ø—‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,à×Ñœ˜Y›¨Ô+Ø×ÑØØ�i‰iœÐ# d§i¡iÔ1QÐ%RÐSõ	
r!   N)r)   r*   r+   r¥   r±   rJ  r   rQ  rP  r\  r`  r,   r!   r   rC  rC  A  s,   „ ô
-�F—O‘Oô 
-òPò7ò$ò>ó$
r!   rC  c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚUncleanUntilFailureTestszh
    Test that the run-until-failure feature works correctly with the unclean
    error suppressor.
    c                 ó˜   — t         j                  | «       t        j                  t        j
                  | j                  d¬«      | _        y )NTr‰   )rC  r   r   r~   r   rL  r5   r   s    r   r   zUncleanUntilFailureTests.setUp“  s3   € Ü×Ñ Ô%Ü×(Ñ(Ü×Ñ d§k¡kÀ4ô
ˆ�r!   c                 ó@   — t        |j                  j                  «      S )z€
        Get the number of failures that were reported to a result that
        is wrapped in an UncleanFailureWrapper.
        )rf   Ú_originalReporterr  rƒ   s     r   rP  z%UncleanUntilFailureTests._getFailures™  s   € ô
 �6×+Ñ+×4Ñ4Ó5Ð5r!   N)r)   r*   r+   rZ   r   rP  r,   r!   r   rb  rb  �  s   „ ñò

ó6r!   rb  c                   ó   — e Zd ZdZd„ Zy)ÚBreakingSuitez;
    A L{TestSuite} that logs an error when it is run.
    c                 ó†   — 	 t        d«      ‚# t         $ r* t        j                  t        j                  «       «       Y y w xY w)Nz#error that occurs outside of a test)ÚRuntimeErrorr   Úerrr
   ÚFailurerƒ   s     r   rg   zBreakingSuite.run¦  s5   € ð	'ÜÐDÓEÐEøÜò 	'Ü�G‰G”G—O‘OÓ%Ö&ð	'ús   ‚ �0A ¿A N)r)   r*   r+   rZ   rg   r,   r!   r   rg  rg  ¡  s   „ ñó'r!   rg  c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)ÚLoggedErrorsTestsa  
    It is possible for an error generated by a test to be logged I{outside} of
    any test. The log observers constructed by L{TestCase} won't catch these
    errors. Here we try to generate such errors and ensure they are reported to
    a L{TestResult} object.
    c                 ó.   — | j                  t        «       y r   )ÚflushLoggedErrorsri  r   s    r   rÕ   zLoggedErrorsTests.tearDownµ  s   € Ø×Ñœ|Õ,r!   c                 ól   — t        j                  «       }| j                  |j                  «       d«       y)zg
        Check that we can construct a L{runner.LoggedSuite} and that it
        starts empty.
        r   N)r   ÚLoggedSuiterh   ÚcountTestCases)r   r¦   s     r   Útest_constructz LoggedErrorsTests.test_construct¸  s+   € ô
 ×"Ñ"Ó$ˆØ×Ñ˜×-Ñ-Ó/°Õ3r!   c                 ó¸  — t        j                  «       }t        j                  t	        «       g«      }|j                  |«       | j                  t        |j                  «      d«       | j                  |j                  d   d   j                  «       t        j                  «       | j                  |j                  d   d   j                  t        «      «       y)zU
        Chek that a L{LoggedSuite} reports any logged errors to its result.
        r$   r   N)r   Ú
TestResultr   rq  rg  rg   rh   rf   r  ÚidÚNOT_IN_TESTrs   Úcheckri  )r   r„   r¦   s      r   Útest_capturesErrorz$LoggedErrorsTests.test_capturesErrorÀ  sž   € ô ×$Ñ$Ó&ˆÜ×"Ñ"¤M£OÐ#4Ó5ˆØ�	‰	�&ÔØ×Ñœ˜VŸ]™]Ó+¨QÔ/Ø×Ñ˜Ÿ™ qÑ)¨!Ñ,×/Ñ/Ó1´6×3EÑ3EÔFØ�‰˜Ÿ™ aÑ(¨Ñ+×1Ñ1´,Ó?Õ@r!   N)r)   r*   r+   rZ   rÕ   rs  ry  r,   r!   r   rm  rm  ­  s   „ ñò-ò4ó	Ar!   rm  c                   ó$   — e Zd Zd„ Zd„ Zd„ Zd„ Zy)ÚTestHolderTestsc                 óZ   — d| _         t        j                  | j                   «      | _        y ©Nr¾   )r¾   r   Ú
TestHolderÚholderr   s    r   r   zTestHolderTests.setUpÍ  s"   € Ø(ˆÔÜ×'Ñ'¨×(8Ñ(8Ó9ˆ�r!   c                 óÔ   — | j                  | j                  j                  «       | j                  «       | j                  | j                  j	                  «       | j                  «       y)z¸
        Check that L{runner.TestHolder} takes a description as a parameter
        and that this description is returned by the C{id} and
        C{shortDescription} methods.
        N)rh   r  rv  r¾   ÚshortDescriptionr   s    r   Útest_holderzTestHolderTests.test_holderÑ  sH   € ð 	×Ñ˜Ÿ™Ÿ™Ó)¨4×+;Ñ+;Ô<Ø×Ñ˜Ÿ™×5Ñ5Ó7¸×9IÑ9IÕJr!   c                 óÞ   — | j                  | j                  t        | j                  «      «       | j                  t	        t        | j                  «      | j                  ›dt        ›d�«       y)z?
        L{runner.TestHolder} implements L{ITestCase}.
        z claims to provide z but does not do so correctly.N)r‚   r  r   rs   r   r   s    r   Útest_holderImplementsITestCasez.TestHolderTests.test_holderImplementsITestCaseÚ  sI   € ð 	×Ñ˜TŸ[™[¬)°D·K±KÓ*@ÔAØ�‰Üœ D§K¡KÓ0à�{‹{žIð'õ	
r!   c                 óØ   — t        j                  «       }| j                  j                  |«       | j	                  |j                  «       «       | j                  d|j                  «       y)zc
        A L{runner.TestHolder} can run against the standard Python
        C{TestResult}.
        r$   N)r¥   ru  r  rg   rs   rY   rh   r\   rƒ   s     r   Útest_runsWithStandardResultz+TestHolderTests.test_runsWithStandardResultå  sK   € ô
 ×"Ñ"Ó$ˆØ�‰�‰˜ÔØ�‰˜×,Ñ,Ó.Ô/Ø×Ñ˜˜FŸO™OÕ,r!   N)r)   r*   r+   r   r‚  r„  r†  r,   r!   r   r{  r{  Ì  s   „ ò:òKò	
ó-r!   r{  c                   óR   — e Zd ZdZ ed«      Z G d„ d«      Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zy
)ÚErrorHolderTestsMixinaa  
    This mixin defines test methods which can be applied to a
    L{runner.ErrorHolder} constructed with either a L{Failure} or a
    C{exc_info}-style tuple.

    Subclass this and implement C{setUp} to create C{self.holder} referring to a
    L{runner.ErrorHolder} instance and C{self.error} referring to a L{Failure}
    which the holder holds.
    z"integer division or modulo by zeroc                   ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)ú$ErrorHolderTestsMixin.TestResultStubz)
        Stub for L{TestResult}.
        c                 ó   — g | _         y r   )r  r   s    r   r    z-ErrorHolderTestsMixin.TestResultStub.__init__  s	   € ØˆD�Kr!   c                  ó   — y r   r,   rE   s     r   r:   z.ErrorHolderTestsMixin.TestResultStub.startTest  ó   € Ør!   c                  ó   — y r   r,   rE   s     r   r>   z-ErrorHolderTestsMixin.TestResultStub.stopTest  r�  r!   c                 ó>   — | j                   j                  ||f«       y r   )r  r&   rK   s      r   rM   z-ErrorHolderTestsMixin.TestResultStub.addError  s   € Ø�K‰K×Ñ  e˜}Õ-r!   N)r)   r*   r+   rZ   r    r:   r>   rM   r,   r!   r   ÚTestResultStubrŠ  ý  s   „ ñ	ò	ò	ò	ó	.r!   r�  c                 óØ   — t        j                  «       }| j                  j                  |«       | j	                  |j                  «       «       | j                  d|j                  «       y)zd
        A L{runner.ErrorHolder} can run against the standard Python
        C{TestResult}.
        r$   N)r¥   ru  r  rg   rO  rY   rh   r\   rƒ   s     r   r†  z1ErrorHolderTestsMixin.test_runsWithStandardResult  sM   € ô
 ×"Ñ"Ó$ˆØ�‰�‰˜ÔØ×Ñ˜×-Ñ-Ó/Ô0Ø×Ñ˜˜FŸO™OÕ,r!   c                 ó2  — | j                   j                  | j                  «       | j                  | j                  j                  | j                   | j
                  j                  | j
                  j                  | j
                  j                  ffg«       y)zM
        L{runner.ErrorHolder} adds an error to the result when run.
        N)	r  rg   r„   rh   r  rL   ÚtypeÚvalueÚtbr   s    r   Útest_runzErrorHolderTestsMixin.test_run  sc   € ð 	�‰�‰˜Ÿ™Ô$Ø×ÑØ�K‰K×ÑØ�k‰k˜DŸJ™JŸO™O¨T¯Z©Z×-=Ñ-=¸t¿z¹z¿}¹}ÐMÐNÐOõ	
r!   c                 ó  — | j                  | j                  «       | j                  | j                  j                  | j                   | j                  j
                  | j                  j                  | j                  j                  ffg«       y)zP
        L{runner.ErrorHolder} adds an error to the result when called.
        N)r  r„   rh   r  rL   r“  r”  r•  r   s    r   Ú	test_callzErrorHolderTestsMixin.test_call"  s_   € ð 	�‰�D—K‘KÔ Ø×ÑØ�K‰K×ÑØ�k‰k˜DŸJ™JŸO™O¨T¯Z©Z×-=Ñ-=¸t¿z¹z¿}¹}ÐMÐNÐOõ	
r!   c                 óX   — | j                  | j                  j                  «       d«       y)zH
        L{runner.ErrorHolder.countTestCases} always returns 0.
        r   N)rh   r  rr  r   s    r   Útest_countTestCasesz)ErrorHolderTestsMixin.test_countTestCases,  s!   € ð 	×Ñ˜Ÿ™×3Ñ3Ó5°qÕ9r!   c                 ó°   — dj                  t        | j                  j                  d   «      «      }| j	                  t        | j                  «      |«       y)zh
        L{runner.ErrorHolder.__repr__} returns a string describing the error it
        holds.
        z0<ErrorHolder description='description' error={}>r$   N)ÚformatÚreprr  rL   rh   )r   Úexpecteds     r   Ú	test_reprzErrorHolderTestsMixin.test_repr2  sG   € ð
 I×OÑOÜ�—‘×"Ñ" 1Ñ%Ó&ó
ˆð 	×Ñœ˜dŸk™kÓ*¨HÕ5r!   N)r)   r*   r+   rZ   ÚZeroDivisionErrorÚexceptionForTestsr�  r†  r–  r˜  rš  rŸ  r,   r!   r   rˆ  rˆ  ð  s8   „ ññ *Ð*NÓOÐ÷.ñ .ò"-ò
ò
ò:ó	6r!   rˆ  c                   ó   — e Zd ZdZd„ Zy)ÚFailureHoldingErrorHolderTestsz“
    Tests for L{runner.ErrorHolder} behaving similarly to L{runner.TestHolder}
    when constructed with a L{Failure} representing its error.
    c                 ó  — d| _         	 | j                  ‚# t        $ r t        j                  «       | _        Y nw xY wt        j                  | j                   | j
                  «      | _        | j                  «       | _
        y r}  )r¾   r¡  r   r
   rk  rL   r   ÚErrorHolderr  r�  r„   r   s    r   r   z$FailureHoldingErrorHolderTests.setUpD  sf   € Ø(ˆÔð	+Ø×(Ñ(Ð(øÜ ò 	+Ü Ÿ™Ó*ˆDŽJð	+úä×(Ñ(¨×)9Ñ)9¸4¿:¹:ÓFˆŒØ×)Ñ)Ó+ˆ�s   ‰ •":¹:Nr‹   r,   r!   r   r£  r£  >  s   „ ñó
,r!   r£  c                   ó   — e Zd ZdZd„ Zy)ÚExcInfoHoldingErrorHolderTestsz 
    Tests for L{runner.ErrorHolder} behaving similarly to L{runner.TestHolder}
    when constructed with a C{exc_info}-style tuple representing its error.
    c                 ó  — d| _         	 | j                  ‚# t        $ r0 t        j                  «       }t        j                  «       | _        Y nw xY wt        j                  | j                   |«      | _
        | j                  «       | _        y r}  )r¾   r¡  r   ÚsysÚexc_infor
   rk  rL   r   r¥  r  r�  r„   )r   ÚexceptionInfos     r   r   z$ExcInfoHoldingErrorHolderTests.setUpU  so   € Ø(ˆÔð	+Ø×(Ñ(Ð(øÜ ò 	+ÜŸL™L›NˆMÜ Ÿ™Ó*ˆDŽJð	+úô ×(Ñ(¨×)9Ñ)9¸=ÓIˆŒØ×)Ñ)Ó+ˆ�s   ‰ •6AÁANr‹   r,   r!   r   r§  r§  O  s   „ ñó
	,r!   r§  c                   óR   — e Zd ZdZ G d„ dej
                  «      Zd„ Zd„ Zd„ Z	d„ Z
y)	ÚMalformedMethodTestszR
    Test that trial manages when test methods don't have correct signatures.
    c                   ó@   — e Zd ZdZd„ Zd„ Z ej                  e«      Zy)ú%MalformedMethodTests.ContainMalformedzV
        This TestCase holds malformed test methods that trial should handle.
        c                  ó   — y r   r,   )r   Úblahs     r   rŸ   z.MalformedMethodTests.ContainMalformed.test_fook  r�  r!   c                   ó   — y r   r,   r,   r!   r   Útest_barz.MalformedMethodTests.ContainMalformed.test_barn  r�  r!   N)	r)   r*   r+   rZ   rŸ   r³  r   ÚinlineCallbacksÚ	test_spamr,   r!   r   ÚContainMalformedr¯  f  s%   „ ñ	ò	ò	ð *�E×)Ñ)¨(Ó3‰	r!   r¶  c                 ón  — t        «       }t        j                  t        j                  |¬«      }t
        j                  |«      }|j                  |«      }| j                  |j                  d«       | j                  |j                  «       «       | j                  t        |j                  «      d«       y)zL
        Wrapper for one of the test method of L{ContainMalformed}.
        r|   r$   N)r   r   r~   r   rL  r­  r¶  rg   rh   r\   rO  rY   rf   r  )r   r<   r5   ÚtrialRunnerrF   r„   s         r   Ú_testzMalformedMethodTests._tests  s…   € ô “ˆÜ×(Ñ(¬×):Ñ):À6ÔJˆÜ#×4Ñ4°VÓ<ˆØ—‘ Ó&ˆØ×Ñ˜Ÿ™¨!Ô,Ø×Ñ˜×-Ñ-Ó/Ô0Ø×Ñœ˜VŸ]™]Ó+¨QÕ/r!   c                 ó&   — | j                  d«       y)zE
        Test when the method has extra (useless) arguments.
        rŸ   N©r¹  r   s    r   Útest_extraArgz"MalformedMethodTests.test_extraArg  ó   € ð 	�
‰
�:Õr!   c                 ó&   — | j                  d«       y)zJ
        Test when the method doesn't have even self as argument.
        r³  Nr»  r   s    r   Ú
test_noArgzMalformedMethodTests.test_noArg…  r½  r!   c                 ó&   — | j                  d«       y)z5
        Test a decorated method also fails.
        rµ  Nr»  r   s    r   Útest_decoratedz#MalformedMethodTests.test_decorated‹  s   € ð 	�
‰
�;Õr!   N)r)   r*   r+   rZ   r¥   r±   r¶  r¹  r¼  r¿  rÁ  r,   r!   r   r­  r­  a  s+   „ ñô4˜6Ÿ?™?ô 4ò
0òòó r!   r­  c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)ÚDestructiveTestSuiteTestsz2
    Test for L{runner.DestructiveTestSuite}.
    c                 óP  ‡— g Š G ˆfd„dt         j                  «      } |d«      }t        j                  «       }t	        j
                  |g«      }| j                  ‰g «       |j                  |«       | j                  ‰dg«       | j                  |j                  «       d«       y)zL
        Thes destructive test suite should run the tests normally.
        c                   ó   •— e Zd Zˆ fd„Zy)ú6DestructiveTestSuiteTests.test_basic.<locals>.MockTestc                 ó(   •— ‰j                  d«       y r)  rU  ©rF   Úcalleds    €r   rŸ   z?DestructiveTestSuiteTests.test_basic.<locals>.MockTest.test_foož  s   ø€ Ø—‘˜dÕ#r!   Nr¡   ©rÉ  s   €r   r°   rÆ  �  s   ø„ õ$r!   r°   rŸ   Tr   N)	r¥   r±   r   ru  r   ÚDestructiveTestSuiterh   rg   rr  )r   r°   rF   r„   r¦   rÉ  s        @r   Ú
test_basicz$DestructiveTestSuiteTests.test_basic—  s�   ø€ ð ˆö	$”v—‘ô 	$ñ ˜
Ó#ˆÜ×$Ñ$Ó&ˆÜ×+Ñ+¨T¨FÓ3ˆØ×Ñ˜ Ô$Ø�	‰	�&ÔØ×Ñ˜ $ Ô(Ø×Ñ˜×-Ñ-Ó/°Õ3r!   c                 óˆ  ‡— g Š G ˆfd„dt         j                  «      }t        j                  «       }t	        j
                  «       }t        j                  |_        |j                  |«      }| j                  ‰g «       |j                  |«       | j                  ‰dg«       | j                  |j                  «       d«       y)zu
        Test the C{shouldStop} management: raising a C{KeyboardInterrupt} must
        interrupt the suite.
        c                   ó(   •— e Zd Zˆ fd„Zd„ Zˆ fd„Zy)ú;DestructiveTestSuiteTests.test_shouldStop.<locals>.MockTestc                 ó(   •— ‰j                  d«       y )Nr$   rU  rÈ  s    €r   Ú	test_foo1zEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo1±  ó   ø€ Ø—‘˜aÕ r!   c                 ó   — t        «       ‚r   )ÚKeyboardInterrupt©rF   s    r   Ú	test_foo2zEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo2´  s   € Ü'Ó)Ð)r!   c                 ó(   •— ‰j                  d«       y )Nrm   rU  rÈ  s    €r   Ú	test_foo3zEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo3·  rÒ  r!   N)r)   r*   r+   rÑ  rÖ  rØ  rÊ  s   €r   r°   rÏ  °  s   ø„ ô!ò*õ!r!   r°   r$   N)r   r±   r   ru  r   r  rË  ÚsuiteFactoryÚ	loadClassrh   rg   rr  )r   r°   r„   r  r¦   rÉ  s        @r   Útest_shouldStopz)DestructiveTestSuiteTests.test_shouldStop©  sŸ   ø€ ð
 ˆö	!”x×(Ñ(ô 	!ô ×$Ñ$Ó&ˆÜ×"Ñ"Ó$ˆÜ$×9Ñ9ˆÔØ× Ñ  Ó*ˆØ×Ñ˜ Ô$Ø�	‰	�&ÔØ×Ñ˜ ! Ô%à×Ñ˜×-Ñ-Ó/°Õ3r!   c                 ó<  —  G d„ dt         j                  «      } |d«      }t        j                  «       }t	        j
                  |g«      }| j                  |j                  «       d«       |j                  |«       | j                  |j                  «       d«       y)zn
        Checks that the test suite cleanups its tests during the run, so that
        it ends empty.
        c                   ó   — e Zd Zd„ Zy)ú8DestructiveTestSuiteTests.test_cleanup.<locals>.MockTestc                  ó   — y r   r,   rÕ  s    r   rŸ   zADestructiveTestSuiteTests.test_cleanup.<locals>.MockTest.test_fooË  r    r!   Nr¡   r,   r!   r   r°   rÞ  Ê  r£   r!   r°   rŸ   r$   r   N)	r¥   r±   r   ru  r   rË  rh   rr  rg   )r   r°   rF   r„   r¦   s        r   Útest_cleanupz&DestructiveTestSuiteTests.test_cleanupÄ  s|   € ô	”v—‘ô 	ñ ˜
Ó#ˆÜ×$Ñ$Ó&ˆÜ×+Ñ+¨T¨FÓ3ˆØ×Ñ˜×-Ñ-Ó/°Ô3Ø�	‰	�&ÔØ×Ñ˜×-Ñ-Ó/°Õ3r!   N)r)   r*   r+   rZ   rÌ  rÛ  rà  r,   r!   r   rÃ  rÃ  ’  s   „ ñò4ò$4ó64r!   rÃ  c                   ó6   — e Zd Z G d„ dej                  «      Zy)ÚRunnerDeprecationTestsc                   ó4   — e Zd ZdZdZdZdZd„ Zd„ Zd„ Z	d„ Z
y)ú#RunnerDeprecationTests.FakeReporterz»
        Fake reporter that does *not* implement done() but *does* implement
        printErrors, separator, printSummary, stream, write and writeln
        without deprecations.
        Nc                  ó   — y r   r,   rØ   s     r   ÚprintErrorsz/RunnerDeprecationTests.FakeReporter.printErrorsâ  r�  r!   c                  ó   — y r   r,   rØ   s     r   ÚprintSummaryz0RunnerDeprecationTests.FakeReporter.printSummaryå  r�  r!   c                  ó   — y r   r,   rØ   s     r   Úwritez)RunnerDeprecationTests.FakeReporter.writeè  r�  r!   c                  ó   — y r   r,   rØ   s     r   Úwritelnz+RunnerDeprecationTests.FakeReporter.writelnë  r�  r!   )r)   r*   r+   rZ   rH   r[   r5   ræ  rè  rê  rì  r,   r!   r   ÚFakeReporterrä  ×  s,   „ ñ	ð ˆØˆ	Øˆò	ò	ò	ó	r!   rí  N)r)   r*   r+   r   rL  rí  r,   r!   r   râ  râ  Ö  s   „ ô�x×(Ñ(õ r!   râ  c                   ó   — e Zd ZdZd„ Zy)ÚQualifiedNameWalkerTestsz<
    Tests for L{twisted.trial.runner._qualNameWalker}.
    c                 ó|   — t        t        j                  d«      «      }| j                  |dg fddgfdddgfg«       y)zè
        C{_qualNameWalker} is a generator that, when given a Python qualified
        name, yields that name, and then the parent of that name, and so forth,
        along with a list of the tried components, in a 2-tuple.
        zwalker.texas.rangerzwalker.texasÚrangerÚwalkerÚtexasN)rÃ   r   Ú_qualNameWalkerrh   )r   ÚwalkerResultss     r   Útest_walksDownPathz+QualifiedNameWalkerTests.test_walksDownPathô  sO   € ô œV×3Ñ3Ð4IÓJÓKˆà×ÑØà&¨Ð+Ø ( Ð,Ø˜G XÐ.Ð/ðõ	
r!   N)r)   r*   r+   rZ   rö  r,   r!   r   rï  rï  ï  s   „ ñó
r!   rï  c                   ó   — e Zd ZdZd„ Zy)ÚTrialMainDoesNothingTestszl
    Importing L{twisted.trial.__main__} will not run the script
    unless it is actually C{__main__}.
    c                 ó   — t        d«       y)zO
        If we import L{twisted.trial.__main__}, it should do nothing.
        ztwisted.trial.__main__N)Ú
__import__r   s    r   Útest_importDoesNothingz0TrialMainDoesNothingTests.test_importDoesNothing  s   € ô
 	Ð+Õ,r!   N)r)   r*   r+   rZ   rû  r,   r!   r   rø  rø    s   „ ñó
-r!   rø  )@rö   r-  r©  r   r¥   Úior   Útypingr   Úzope.interfacer   Úzope.interface.verifyr   Útwistedr   Útwisted.internetr   Útwisted.pluginsr	   Útwisted.pythonr
   r   r   Útwisted.python.filepathr   Útwisted.python.reflectr   Útwisted.scriptsr   Útwisted.trialr   r   r   Útwisted.trial._asyncrunnerr   Útwisted.trial.itrialr   r   r   r.   r^   r¤   rz   r‡   r�   rš   r«   r³   r¹   r?  rC  rb  r“   rg  rm  r{  rˆ  r£  r§  r­  rÃ  râ  rï  rø  r,   r!   r   ú<module>r
     sö  ðó 
Û 
Û 
Û Ý Ý å &Ý .å Ý "Ý )ß 0Ñ 0Ý ,Ý +Ý !ß :Ó :Ý Gß 5÷%ñ %ñ ˆYÓ÷Nð Nó ðN÷b#ñ #ôL5Ð,¨h×.JÑ.Jô 5ô(3Ø˜8×7Ñ7ô3÷ )'ñ )'ôX(˜[¨(×*FÑ*Fô (ô(�+˜x×;Ñ;ô (ô(˜ X×%AÑ%Aô (ô_=�(×.Ñ.ô _=ôD	4�h×2Ñ2ô 4ôI
˜×4Ñ4ô I
ôX6Ð0ô 6ô(	'�F×$Ñ$ô 	'ôA˜×4Ñ4ô Aô>!-�h×2Ñ2ô !-÷HK6ñ K6ô\,Ð%:¸Oô ,ô",Ð%:¸Oô ,ô$. ˜8×7Ñ7ô . ôbA4 × <Ñ <ô A4ôH˜X×9Ñ9ô ô2
˜x×;Ñ;ô 
ô.- × <Ñ <õ -r!   