ó
    ×›‘hÿ}  ã                   óN  • S SK r S SKrS SKrS SKrS SKJr  S SKJr  S SK	J
r
  S SKJr  S SKJr  S SKJr  S SKJr  S S	KJrJrJr  S S
KJr  S SKJr  S SKJr  S SKJrJrJrJ r   S SK!J"r"  S SK#J$r$J%r%   " S S5      r&\
" \$5       " S S5      5       r' " S S5      r( " S S\(\RR                  5      r* " S S\(\RR                  5      r+ " S S5      r, " S S\,\RR                  5      r- " S S\,\RR                  5      r. " S  S!\,\RR                  5      r/ " S" S#\RR                  5      r0 " S$ S%\RR                  5      r1 " S& S'\RR                  5      r2 " S( S)\25      r3 " S* S+\Rh                  5      r5 " S, S-\RR                  5      r6 " S. S/\RR                  5      r7 " S0 S15      r8 " S2 S3\8\75      r9 " S4 S5\8\75      r: " S6 S7\RR                  5      r; " S8 S9\RR                  5      r< " S: S;\RR                  5      r= " S< S=\RR                  5      r> " S> S?\RR                  5      r?g)@é    N)ÚStringIO)ÚList)Úimplementer)ÚverifyObject)Úplugin)Údefer)Útwisted_trial)ÚfailureÚlogÚreflect)ÚFilePath©ÚnamedAny)Útrial)ÚreporterÚrunnerÚunittestÚutil)Ú _ForceGarbageCollectionDecorator)Ú	IReporterÚ	ITestCasec                   ó    • \ rS rSrS rS rSrg)ÚCapturingDebuggeré   c                 ó   • / U l         g ©N©Ú_calls©Úselfs    ÚbC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/trial/test/test_runner.pyÚ__init__ÚCapturingDebugger.__init__   s	   € Øˆ�ó    c                 óV   • U R                   R                  S5        US   " USS  0 UD6  g )NÚruncallr   é   ©r   Úappend)r    ÚargsÚkwargss      r!   r&   ÚCapturingDebugger.runcall"   s+   € Ø�‰×Ñ˜9Ô%ØˆQŠ��a�b�Ð$˜VÓ$r$   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r"   r&   Ú__static_attributes__© r$   r!   r   r      s   † òõ%r$   r   c                   ó€   • \ rS rSrSrSrSrSrSrSr	SS jr
S rS rS rS rS	 rS
 rS rSS jrSS jrS rS rSrg)ÚCapturingReporteré'   z;
Reporter that keeps a log of all actions performed on it.
Nc                 óP   • / U l         SU l        Xl        X l        X0l        X@l        g)z
Create a capturing reporter.
FN)r   Ú
shouldStopÚ_streamÚ	_tbformatÚ	_rterrorsÚ
_publisher)r    ÚstreamÚtbformatÚrterrorsÚ	publishers        r!   r"   ÚCapturingReporter.__init__3   s&   € ð ˆŒØˆŒØŒØ!ŒØ!ŒØ#�r$   c                 ó:   • U R                   R                  S5        g)zq
Report the beginning of a run of a single test method
@param method: an object that is adaptable to ITestMethod
Ú	startTestNr(   ©r    Úmethods     r!   rB   ÚCapturingReporter.startTest>   s   € ð
 	�‰×Ñ˜;Õ'r$   c                 ó:   • U R                   R                  S5        g)ze
Report the status of a single test method
@param method: an object that is adaptable to ITestMethod
ÚstopTestNr(   rC   s     r!   rG   ÚCapturingReporter.stopTestE   s   € ð
 	�‰×Ñ˜:Õ&r$   c                 ó:   • U R                   R                  S5        g)zscalled 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!   ÚcleanupErrorsÚCapturingReporter.cleanupErrorsL   s   € ð 	�‰×Ñ˜>Õ*r$   c                 ó:   • U R                   R                  S5        g )NÚ
addSuccessr(   ©r    Útests     r!   rO   ÚCapturingReporter.addSuccessR   s   € Ø�‰×Ñ˜<Õ(r$   c                 ó   • g)z0
Do nothing. These tests don't care about done.
Nr2   r   s    r!   ÚdoneÚCapturingReporter.doneU   ó   � r$   c                 ó   • g)z4
Do nothing. These tests don't care about addError.
Nr2   ©r    rQ   Úerrors      r!   ÚaddErrorÚCapturingReporter.addErrorZ   rV   r$   c                 ó   • g)z6
Do nothing. These tests don't care about addFailure.
Nr2   )r    rQ   r
   s      r!   Ú
addFailureÚCapturingReporter.addFailure_   rV   r$   c                 ó   • g)z>
Do nothing. These tests don't care about addExpectedFailure.
Nr2   )r    rQ   r
   Útodos       r!   ÚaddExpectedFailureÚ$CapturingReporter.addExpectedFailured   rV   r$   c                 ó   • g)z@
Do nothing. These tests don't care about addUnexpectedSuccess.
Nr2   )r    rQ   r`   s      r!   ÚaddUnexpectedSuccessÚ&CapturingReporter.addUnexpectedSuccessi   rV   r$   c                 ó   • g)z3
Do nothing. These tests don't care about addSkip.
Nr2   )r    rQ   Úreasons      r!   ÚaddSkipÚCapturingReporter.addSkipn   rV   r$   c                 ó   • g)z9
Do nothing. These tests don't care about wasSuccessful.
Nr2   r   s    r!   ÚwasSuccessfulÚCapturingReporter.wasSuccessfuls   rV   r$   )r   r;   r:   r8   r9   r7   )NNNNr   )r-   r.   r/   r0   Ú__doc__r<   r=   r*   Ú	separatorÚtestsRunr"   rB   rG   rL   rO   rT   rZ   r]   ra   rd   rh   rk   r1   r2   r$   r!   r4   r4   '   s^   † ñð €FØ€HØ€DØ€IØ€Hô	$ò(ò'ò+ò)òò
ò
ô
ô
ò
õ
r$   r4   c                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	ÚTrialRunnerTestsMixinéy   z1
Mixin defining tests for L{runner.TrialRunner}.
c                 ó   • g)z-
Empty test method, used by the other tests.
Nr2   r   s    r!   Ú
test_emptyÚ TrialRunnerTestsMixin.test_empty~   rV   r$   c                 ó6   • [         R                  R                  $ r   )r   ÚtheLogPublisherÚ	observersr   s    r!   Ú_getObserversÚ#TrialRunnerTestsMixin._getObserversƒ   s   € Ü×"Ñ"×,Ñ,Ð,r$   c                 óÔ   • [        U R                  5       5      nU R                  R                  U R                  5        [        U R                  5       5      nU R                  X!5        g)zV
Any log system observers L{TrialRunner.run} adds are removed by the
time it returns.
N)Úlenry   r   ÚrunrQ   ÚassertEqual)r    ÚoriginalCountÚnewCounts      r!   Útest_addObserversÚ'TrialRunnerTestsMixin.test_addObservers†   sL   € ô
 ˜D×.Ñ.Ó0Ó1ˆØ�‰�‰˜Ÿ	™	Ô"Ü�t×)Ñ)Ó+Ó,ˆØ×Ñ˜Õ1r$   c                 ót  • [        U R                  R                  5      R                  U R                  R                  5      n[        S5       Hg  nU R                  R                  U R                  5        UR                  5         U R                  UR                  5       5        UR                  5         Mi     g)z-
Test that a new file is opened on each run.
é   N)r   r   ÚworkingDirectoryÚchildÚlogfileÚranger}   rQ   ÚrestatÚ
assertTrueÚexistsÚremove)r    ÚlogPathÚis      r!   Útest_logFileAlwaysActiveÚ.TrialRunnerTestsMixin.test_logFileAlwaysActive�   sx   € ô ˜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$   r2   N)
r-   r.   r/   r0   rm   rt   ry   r�   r�   r1   r2   r$   r!   rq   rq   y   s   † ñòò
-ò2õr$   rq   c                   ó$   • \ rS rSrSrS rS rSrg)ÚTrialRunnerTestséŸ   za
Tests for L{runner.TrialRunner} with the feature to turn unclean errors
into warnings disabled.
c                 ó’   • [        5       U l        [        R                  " [        U R                  S9U l        [        S5      U l        g )N©r<   rt   ©r   r<   r   ÚTrialRunnerr4   r’   rQ   r   s    r!   ÚsetUpÚTrialRunnerTests.setUp¥   s0   € Ü“jˆŒÜ×(Ò(Ô):À4Ç;Á;ÑOˆŒÜ$ \Ó2ˆ�	r$   c                 óx   • U R                   R                  5       nU R                  UR                  [        5        g)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ÚassertIdenticalr;   r   ©r    Úresults     r!   Útest_publisherÚTrialRunnerTests.test_publisherª   s,   € ð
 —‘×(Ñ(Ó*ˆØ×Ñ˜V×.Ñ.´Õ4r$   ©r   r<   rQ   N)r-   r.   r/   r0   rm   r˜   rŸ   r1   r2   r$   r!   r’   r’   Ÿ   s   † ñò
3õ
5r$   r’   c                   ó   • \ rS rSrSrS rSrg)Ú+TrialRunnerWithUncleanWarningsReporterTestsé³   zU
Tests for the TrialRunner's interaction with an unclean-error suppressing
reporter.
c                 ó”   • [        5       U l        [        R                  " [        U R                  SS9U l        [        S5      U l        g )NT©r<   ÚuncleanWarningsrt   r–   r   s    r!   r˜   Ú1TrialRunnerWithUncleanWarningsReporterTests.setUp»   s6   € Ü“jˆŒÜ×(Ò(Ü d§k¡kÀ4ñ
ˆŒô % \Ó2ˆ�	r$   r¡   N©r-   r.   r/   r0   rm   r˜   r1   r2   r$   r!   r£   r£   ³   s   † ñõ
3r$   r£   c                   ó6   • \ rS rSrSrS rS rS rS rS r	Sr
g	)
ÚDryRunMixinéÃ   zY
Mixin for testing that 'dry run' mode works with various
L{pyunit.TestCase} subclasses.
c                 óÒ   • / U l         [        5       U l        [        R                  " [
        [        R                  R                  U R                  S9U l        U R                  5         g )Nr•   )r   r   r<   r   r—   r4   ÚDRY_RUNÚmakeTestFixturesr   s    r!   r˜   ÚDryRunMixin.setUpÉ   sI   € ØˆŒÜ“jˆŒÜ×(Ò(Üœv×1Ñ1×9Ñ9À$Ç+Á+ñ
ˆŒð 	×ÑÕr$   c                 ó   • g)zP
Set C{self.test} and C{self.suite}, where C{self.suite} is an empty
TestSuite.
Nr2   r   s    r!   r¯   ÚDryRunMixin.makeTestFixturesÑ   rV   r$   c                 ó˜   • U R                   R                  [         R                  " 5       5      nU R                  UR                  / 5        g)zN
If there are no tests, the reporter should not receive any events to
report.
N)r   r}   Ú	TestSuiter~   r   r�   s     r!   rt   ÚDryRunMixin.test_empty×   s3   € ð
 —‘—‘¤×!1Ò!1Ó!3Ó4ˆØ×Ñ˜Ÿ™¨Õ+r$   c                 óŠ   • U R                   R                  U R                  5      nU R                  UR                  / SQ5        g)zn
If we are running a single test, check the reporter starts, passes and
then stops the test during a dry run.
©rB   rO   rG   N)r   r}   rQ   r~   r   r�   s     r!   Útest_singleCaseReportingÚ$DryRunMixin.test_singleCaseReportingß   s/   € ð
 —‘—‘ §¡Ó+ˆØ×Ñ˜Ÿ™Ò(OÕPr$   c                 ó†   • U R                   R                  U R                  5        U R                  U R                  / 5        g)zD
When we are doing a dry run, the tests should not actually be run.
N)r   r}   rQ   r~   r   r   s    r!   Útest_testsNotRunÚDryRunMixin.test_testsNotRunç   s,   € ð 	�‰�‰˜Ÿ	™	Ô"Ø×Ñ˜Ÿ™ 2Õ&r$   )r   r   r<   N)r-   r.   r/   r0   rm   r˜   r¯   rt   r¸   r»   r1   r2   r$   r!   r«   r«   Ã   s!   † ñò
 òò,òQõ'r$   r«   c                   ó   • \ rS rSrSrS rSrg)ÚSynchronousDryRunTestséï   zK
Check that 'dry run' mode works well with trial's L{SynchronousTestCase}.
c                 ó„   •  " S S[         R                  5      nU" S5      U l        [        R                  " 5       U l        g )Nc                   ó   • \ rS rSrS rSrg)Ú;SynchronousDryRunTests.makeTestFixtures.<locals>.PyunitCaseéõ   c                 ó   • g r   r2   r   s    r!   Útest_fooÚDSynchronousDryRunTests.makeTestFixtures.<locals>.PyunitCase.test_fooö   ó   € Ør$   r2   N©r-   r.   r/   r0   rÅ   r1   r2   r$   r!   Ú
PyunitCaserÂ   õ   ó   † õr$   rÉ   rÅ   )r   ÚSynchronousTestCaserQ   Úpyunitr´   Úsuite©r    rÉ   s     r!   r¯   Ú'SynchronousDryRunTests.makeTestFixturesô   s2   € ô	œ×5Ñ5ô 	ñ ˜zÓ*ˆŒ	Ü×%Ò%Ó'ˆ�
r$   ©rÍ   rQ   N©r-   r.   r/   r0   rm   r¯   r1   r2   r$   r!   r¾   r¾   ï   ó   † ñõ(r$   r¾   c                   ó   • \ rS rSrSrS rSrg)ÚDryRunTestséý   z8
Check that 'dry run' mode works well with Trial tests.
c                 óŒ   ^ •  " U 4S jS[         R                  5      nU" S5      T l        [        R                  " 5       T l        g )Nc                   ó"   >• \ rS rSrU 4S jrSrg)Ú.DryRunTests.makeTestFixtures.<locals>.MockTesti  c                 ó<   >• TR                   R                  S5        g )NrÅ   )r   r)   )rQ   r    s    €r!   rÅ   Ú7DryRunTests.makeTestFixtures.<locals>.MockTest.test_foo  s   ø€ Ø—‘—‘ 
Õ+r$   r2   NrÈ   r   s   €r!   ÚMockTestrØ     s   ø† ÷,ð ,r$   rÛ   rÅ   )r   ÚTestCaserQ   r   r´   rÍ   )r    rÛ   s   ` r!   r¯   ÚDryRunTests.makeTestFixtures  s3   ø€ ÷	,”x×(Ñ(ô 	,ñ ˜ZÓ(ˆŒ	Ü×%Ò%Ó'ˆ�
r$   rÐ   NrÑ   r2   r$   r!   rÔ   rÔ   ý   rÒ   r$   rÔ   c                   ó   • \ rS rSrSrS rSrg)ÚPyUnitDryRunTestsi  zB
Check that 'dry run' mode works well with stdlib unittest tests.
c                 ó„   •  " S S[         R                  5      nU" S5      U l        [         R                  " 5       U l        g )Nc                   ó   • \ rS rSrS rSrg)Ú6PyUnitDryRunTests.makeTestFixtures.<locals>.PyunitCasei  c                 ó   • g r   r2   r   s    r!   rÅ   Ú?PyUnitDryRunTests.makeTestFixtures.<locals>.PyunitCase.test_foo  rÇ   r$   r2   NrÈ   r2   r$   r!   rÉ   râ     rÊ   r$   rÉ   rÅ   )rÌ   rÜ   rQ   r´   rÍ   rÎ   s     r!   r¯   Ú"PyUnitDryRunTests.makeTestFixtures  s0   € ô	œŸ™ô 	ñ ˜zÓ*ˆŒ	Ü×%Ò%Ó'ˆ�
r$   rÐ   NrÑ   r2   r$   r!   rß   rß     rÒ   r$   rß   c                   óŽ   • \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS r\" 5       rS rS rSrg)ÚRunnerTestsi  c           	      óZ  ^ ^• [         R                  " 5       T l        [        R                  " [
        5      R                  S5      nSR                  US S 5      nUS   n[        R                  " SUSSS US9/mUU 4S jn[        R                  T l        U[        l        / SQS	-  T l        g )
NÚ.éÿÿÿÿzTest Helper ReporterzUtility for unit testing.Ú	capturing)ÚdescriptionÚlongOptÚshortOptÚklassc                 ót   >• TR                  U [        5        T[        TR                  " U /UQ70 UD65      -   $ r   )r~   r   ÚlistÚoriginal)ÚifaceÚaÚkwÚpluginsr    s      €€r!   Ú
getPluginsÚ%RunnerTests.setUp.<locals>.getPlugins/  s6   ø€ Ø×Ñ˜U¤IÔ.ØœT $§-¢-°Ð"@¸Ò"@¸RÑ"@ÓAÑAÐAr$   r·   é
   )r   ÚOptionsÚconfigr   Úqualr4   ÚsplitÚjoinr	   Ú	_Reporterr   r÷   rò   ÚstandardReport)r    ÚpartsÚpackagerï   r÷   rö   s   `    @r!   r˜   ÚRunnerTests.setUp  s�   ù€ Ü—m’m“oˆŒô —’Ô.Ó/×5Ñ5°cÓ:ˆØ—(‘(˜5  "˜:Ó&ˆØ�b‘	ˆä×#Ò#Ø&ØØ7Ø#ØØñð	
ˆö	Bô ×)Ñ)ˆŒØ&ŒÔò
 FÈÑJˆÕr$   c                 ó.   • U R                   [        l        g r   )rò   r   r÷   r   s    r!   ÚtearDownÚRunnerTests.tearDown;  s   € Ø ŸM™MŒÕr$   c                 ó:   • U R                   R                  U5        g r   )rû   ÚparseOptions©r    r*   s     r!   r  ÚRunnerTests.parseOptions>  s   € Ø�‰× Ñ  Õ&r$   c                 ód   • [         R                  " U R                  5      n[        5       Ul        U$ r   )r   Ú_makeRunnerrû   r   r<   )r    Úrs     r!   Ú	getRunnerÚRunnerTests.getRunnerA  s$   € Ü×Ò˜dŸk™kÓ*ˆÜ“:ˆŒØˆr$   c                 ó¸   • U R                  / 5        U R                  S   nU R                  5       nU R                  XR                  " 5       R
                  5        g ©Nr   )r  rû   r  r~   r›   Ú	__class__)r    rž   r   s      r!   Útest_runner_can_get_reporterÚ(RunnerTests.test_runner_can_get_reporterF  sG   € Ø×Ñ˜"ÔØ—‘˜ZÑ(ˆØ—‘Ó!ˆØ×Ñ˜×!3Ò!3Ó!5×!?Ñ!?Õ@r$   c                 óº   • U R                  / 5        U R                  5       nUR                  " 5       nU R                  UR                  U R
                  S   5        g r  )r  r  r›   r~   r  rû   ©r    r   rž   s      r!   Útest_runner_get_resultÚ"RunnerTests.test_runner_get_resultL  sI   € Ø×Ñ˜"ÔØ—‘Ó!ˆØ×#Ò#Ó%ˆØ×Ñ˜×)Ñ)¨4¯;©;°zÑ+BÕCr$   c                 ó¤   • U R                  / 5        U R                  5       nU R                  UR                  " 5       [        R
                  5        g)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_uncleanWarningsOffByDefaultÚ,RunnerTests.test_uncleanWarningsOffByDefaultR  s@   € ð 	×Ñ˜"ÔØ—‘Ó!ˆØ× Ñ Ø×ÒÓ ¤(×"IÑ"Iõ	
r$   c                 ó¦   • U R                  S/5        U R                  5       nU R                  UR                  " 5       [        R
                  5        g)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_getsUncleanWarningsÚ$RunnerTests.test_getsUncleanWarnings^  sD   € ð 	×ÑÐ/Ð0Ô1Ø—‘Ó!ˆØ×ÑØ×ÒÓ ¤(×"IÑ"Iõ	
r$   c                 ó‚   • U R                  SS/5        U R                  5       nU R                  UR                  S5        g )Nú--temp-directoryÚ	some_path)r  r  r~   r…   r  s     r!   Útest_runner_working_directoryÚ)RunnerTests.test_runner_working_directoryj  s8   € Ø×ÑÐ-¨{Ð;Ô<Ø—‘Ó!ˆØ×Ñ˜×0Ñ0°+Õ>r$   c                 óÒ  ^^^^• U R                  / 5        U R                  [        R                  [        R                  " 5       5        [        U R                  5       5      mTR                  5         [        R                  " TR                  5        U R                  5       nU R                  5       m0 m " UUUU4S jS[        R                  5      mUR                  T" S5      5      nUR                  UR                  -   nU(       a  U R                  US   S   5        U R!                  TTR#                  S5      R                  TR#                  S5      R                  S.5        g	)
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                   ó4   >• \ rS rSrU UUU4S jrU4S jrSrg)ÚKRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCasei‡  c                 óè   >• [         R                  " 5       =TS'   n[         R                  " TR                  5        U R	                  [         R                  U5        TR                  T" S5      5        g)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Ú
addCleanupr}   )r    ÚsubsequentDirectoryÚConcurrentCaseÚrunDirectoryÚsecondRunnerÚwheres     €€€€r!   Ú
test_firstÚVRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCase.test_firstˆ  sS   ø€ ô =?¿IºI»KÐG��lÑ#Ð&9Ü—’˜×*Ñ*Ô+Ø—‘¤§¡Ð*=Ô>à× Ñ ¡°Ó!>Õ?r$   c                 ó6   >• [         R                  " 5       TS'   g)z2
Record the working directory for later analysis.
ÚrecordN)r.  r/  )r    r7  s    €r!   r-  ÚWRunnerTests.test_concurrentImplicitWorkingDirectory.<locals>.ConcurrentCase.test_second–  s   ø€ ô #%§)¢)£+��h’r$   r2   N)r-   r.   r/   r0   r8  r-  r1   )r4  r5  r6  r7  s   €€€€r!   r4  r*  ‡  s   ø† ÷@ð @÷.ð .r$   r4  r8  r   r'   Ú_trial_tempz_trial_temp-1)r,  r;  N)r  r2  r.  r0  r/  r   ÚmktempÚmakedirsr1  r  r   rË   r}   ÚerrorsÚfailuresÚfailr~   r†   )r    ÚfirstRunnerrž   Úbadr4  r5  r6  r7  s       @@@@r!   Ú'test_concurrentImplicitWorkingDirectoryÚ3RunnerTests.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                 ó  ^^• U R                  S[        R                  R                  U R	                  5       5      /5        [        R
                  " 5       nU R                  [        R                  U5        U R                  5       nU R                  5       m " UU4S jS[        R                  5      mUR                  T" S5      5      nUR                  UR                  -   nU(       a  U R                  US   S   5        gg)z}
If a working directory which is already in use is explicitly specified,
L{TrialRunner.run} raises L{_WorkingDirectoryBusy}.
r$  c                   ó*   >• \ rS rSrU U4S jrS rSrg)ÚKRunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCaseiµ  c                 óh   >• U R                  [        R                  TR                  T" S5      5        g)zo
Try to start another runner in the same working directory and
assert that it raises L{_WorkingDirectoryBusy}.
Útest_failureN)ÚassertRaisesr   Ú_WorkingDirectoryBusyr}   )r    r4  r6  s    €€r!   Útest_concurrentÚ[RunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCase.test_concurrent¶  s-   ø€ ð
 ×!Ñ!Ü×.Ñ.Ø ×$Ñ$Ù" >Ó2õr$   c                 ó&   • U R                  S5        g)z%
Should not be called, always fails.
z$test_failure should never be called.N)rB  r   s    r!   rK  ÚXRunnerTests.test_concurrentExplicitWorkingDirectory.<locals>.ConcurrentCase.test_failureÁ  s   € ð —	‘	Ð@ÕAr$   r2   N)r-   r.   r/   r0   rN  rK  r1   )r4  r6  s   €€r!   r4  rI  µ  s   ø† ö	õBr$   r4  rN  r   r'   N)r  r.  r1  Úabspathr>  r/  r2  r0  r  r   rË   r}   r@  rA  rB  )r    ÚinitialDirectoryrC  rž   rD  r4  r6  s        @@r!   Ú'test_concurrentExplicitWorkingDirectoryÚ3RunnerTests.test_concurrentExplicitWorkingDirectory¨  sÁ   ù€ ð
 	×ÑÐ-¬r¯w©w¯©¸t¿{¹{»}Ó/MÐNÔOäŸ9š9›;ÐØ�‰œŸ™Ð"2Ô3à—n‘nÓ&ˆØ—~‘~Ó'ˆ÷	Bð 	BœX×9Ñ9ô 	Bð$ —‘¡Ð0AÓ!BÓCˆØ�m‰m˜fŸo™oÑ-ˆÞØ�I‰I�c˜!‘f˜Q‘iÕ ð r$   c                 ó(  • U R                  SU R                  5       SSS/5        U R                  5       n[        R                  " 5       nUR                  SS5      nUR                  U5      nU R                  U R                  UR                  5        g )Nr$  ú
--reporterrë   útwisted.trial.test.sampleT)
r  r>  r  r   Ú
TestLoaderÚ
loadByNamer}   r~   r   r   )r    Ú	my_runnerÚloaderrÍ   rž   s        r!   Útest_runner_normalÚRunnerTests.test_runner_normalÌ  s�   € Ø×Ñà"Ø—‘“ØØØ+ðô	
ð —N‘NÓ$ˆ	Ü×"Ò"Ó$ˆØ×!Ñ!Ð"=¸tÓDˆØ—‘˜uÓ%ˆØ×Ñ˜×,Ñ,¨f¯m©mÕ<r$   c                 ór   • [         R                  " 5       nUR                  SS5      nUR                  U5      $ )NrX  T)r   rY  rZ  r}   )r    r[  r\  rÍ   s       r!   ÚrunSampleSuiteÚRunnerTests.runSampleSuiteÜ  s2   € Ü×"Ò"Ó$ˆØ×!Ñ!Ð"=¸tÓDˆØ�}‰}˜UÓ#Ð#r$   c                 ó  • U R                  / SQ5        U R                  5       n[        5       =o!l        U R	                  U5      nU R                  U R                  UR                  5        U R                  S/UR                  5        g)z<
Trial uses its debugger if the `--debug` option is passed.
)rW  rë   ú--debugrX  r&   N)r  r  r   Údebuggerr`  r~   r   r   )r    r[  rd  rž   s       r!   Útest_runnerDebugÚRunnerTests.test_runnerDebugá  sq   € ð 	×ÑÚOô	
ð —N‘NÓ$ˆ	Ü(9Ó(;Ð;ˆÔ%Ø×$Ñ$ YÓ/ˆØ×Ñ˜×,Ñ,¨f¯m©mÔ<Ø×Ñ˜)˜ h§o¡oÕ6r$   c                 ó2  ^ • T R                  SS/5        [        S5      nUR                  5         ST l        U 4S jnT R	                  [
        R                  SU5        T R                  T R                  5       5        T R                  T R                  5        g)z<
Trial uses pdb if no debugger is specified by `--debugger`
rc  rX  ÚpdbrcFc                 ó   >• STl         g ©NT©Úruncall_called©ÚpdbrÍ   rž   r    s      €r!   r&   Ú=RunnerTests.test_runnerDebuggerDefaultsToPdb.<locals>.runcallø  ó   ø€ Ø"&ˆDÕr$   r&   N)
r  r   Útouchrl  Úpatchrn  ÚPdbr`  r  rŠ   )r    Ú	pdbrcFiler&   s   `  r!   Ú test_runnerDebuggerDefaultsToPdbÚ,RunnerTests.test_runnerDebuggerDefaultsToPdbî  sw   ø€ ð 	×Ñ˜9Ð&AÐBÔCÜ˜WÓ%ˆ	Ø�‰Ôà#ˆÔõ	'ð 	�
‰
”3—7‘7˜I wÔ/à×Ñ˜DŸN™NÓ,Ô-à�‰˜×+Ñ+Õ,r$   c                 óü   ^ • T R                  / SQ5        ST l        U 4S jnT R                  [        R                  SU5        T R                  T R                  5       5        T R                  T R                  5        g)zE
Trial uses pdb if pdb is passed explicitly to the `--debugger` arg.
)rW  rë   ú
--debuggerrn  rc  rX  Fc                 ó   >• STl         g rj  rk  rm  s      €r!   r&   ÚGRunnerTests.test_runnerDebuggerWithExplicitlyPassedPdb.<locals>.runcall  rp  r$   r&   N)r  rl  rr  rn  rs  r`  r  rŠ   )r    r&   s   ` r!   Ú*test_runnerDebuggerWithExplicitlyPassedPdbÚ6RunnerTests.test_runnerDebuggerWithExplicitlyPassedPdb  sd   ø€ ð 	×Ñòô		
ð $ˆÔõ	'ð 	�
‰
”3—7‘7˜I wÔ/à×Ñ˜DŸN™NÓ,Ô-à�‰˜×+Ñ+Õ,r$   c                 ó  • U R                  / SQ5        U R                  5       nU R                  U5      nU R                  U R                  UR
                  5        U R                  S/UR                  R
                  5        g)z=
Trial uses specified debugger if the debugger is available.
)rW  rë   rx  z4twisted.trial.test.test_runner.RunnerTests.cdebuggerrc  rX  r&   N)r  r  r`  r~   r   r   rd  )r    r[  rž   s      r!   Útest_runnerDebuggerÚRunnerTests.test_runnerDebugger  sm   € ð 	×Ñòô		
ð —N‘NÓ$ˆ	Ø×$Ñ$ YÓ/ˆØ×Ñ˜×,Ñ,¨f¯m©mÔ<Ø×Ñ˜)˜ i×&8Ñ&8×&?Ñ&?Õ@r$   c                 óª   • U R                  S/5        U R                  5       nUR                  " 5       nU R                  U[        R
                  5        g)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_exitfirstÚRunnerTests.test_exitfirst0  sD   € ð
 	×Ñ˜=˜/Ô*Ø—‘Ó!ˆØ×#Ò#Ó%ˆØ×Ñ˜f¤h×&;Ñ&;Õ<r$   )rû   rò   rl  r   N)r-   r.   r/   r0   r˜   r  r  r  r  r  r  r!  r&  rE  rT  r]  r`  re  ru  r{  r   Ú	cdebuggerr~  r‚  r1   r2   r$   r!   rç   rç     sm   † òKòB*ò'òò
AòDò

ò

ò?ò
7
òr"!òH=ò $ò
7ò-ò&-ñ4 "Ó#€IòAõ&=r$   rç   c                   ó   • \ rS rSrS rSrg)ÚTrialSuiteTestsi;  c                 ó   • [        S5        g )Nztwisted.trial.runner.TrialSuiter   r   s    r!   Útest_importsÚTrialSuiteTests.test_imports<  s   € äÐ2Õ3r$   r2   N)r-   r.   r/   r0   rˆ  r1   r2   r$   r!   r†  r†  ;  s   † õ4r$   r†  c                   ó\   • \ rS rSr " S S\R
                  5      rS rS rS r	S r
S rS	rg
)ÚUntilFailureTestsiA  c                   ó4   • \ rS rSr% Sr/ r\S   \S'   S rSr	g)ÚUntilFailureTests.FailAfteriB  z3
A test case that fails when run 3 times in a row.
NÚcountc                 ó�   • U R                   R                  S 5        [        U R                   5      S:X  a  U R                  S5        g g )Né   zCount reached 3)rŽ  r)   r|   rB  r   s    r!   rÅ   Ú$UntilFailureTests.FailAfter.test_fooI  s6   € Ø�J‰J×Ñ˜dÔ#Ü�4—:‘:‹ !Ó#Ø—	‘	Ð+Õ,ð $r$   r2   )
r-   r.   r/   r0   rm   rŽ  r   Ú__annotations__rÅ   r1   r2   r$   r!   Ú	FailAfterr�  B  s   ‡ ñ	ð ˆˆt�D‰zÓõ	-r$   r“  c                 óä   • / [         R                  l        [         R                  S5      U l        [	        5       U l        [        R                  " [        R                  U R
                  S9U l        g )NrÅ   r•   )
r‹  r“  rŽ  rQ   r   r<   r   r—   r   ÚReporterr   s    r!   r˜   ÚUntilFailureTests.setUpN  sJ   € Ø,.Ô×#Ñ#Ô)Ü%×/Ñ/°
Ó;ˆŒ	Ü“jˆŒÜ×(Ò(¬×):Ñ):À4Ç;Á;ÑOˆ�r$   c                 ó  • U R                   R                  U R                  5      nU R                  UR                  S5        U R                  UR                  5       5        U R                  U R                  U5      S5        g)zT
Test that the runUntilFailure method of the runner actually fail after
a few runs.
r'   N)r   ÚrunUntilFailurerQ   r~   ro   ÚassertFalserk   Ú_getFailuresr�   s     r!   Útest_runUntilFailureÚ&UntilFailureTests.test_runUntilFailureT  sb   € ð
 —‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,Ø×Ñ˜×-Ñ-Ó/Ô0Ø×Ñ˜×*Ñ*¨6Ó2°AÕ6r$   c                 ó,   • [        UR                  5      $ )z<
Get the number of failures that were reported to a result.
)r|   rA  r�   s     r!   rš  ÚUntilFailureTests._getFailures^  s   € ô �6—?‘?Ó#Ð#r$   c                 óB  ^• / mU4S jnU R                  [        SU5        U R                  R                  U R                  5      nU R                  UR                  S5        U R                  [        T5      S5        U R                  TU R                  [        4/5        g)zu
C{runUntilFailure} doesn't decorate the tests uselessly: it does it one
time when run starts, but not at each turn.
c                 ó,   >• TR                  X45        U $ r   ©r)   ©rQ   Ú	interfaceÚ	decorateds     €r!   ÚdecorateÚ@UntilFailureTests.test_runUntilFailureDecorate.<locals>.decoratek  ó   ø€ Ø×Ñ˜dÐ.Ô/ØˆKr$   r¥  r'   N)	rr  r   r   r˜  rQ   r~   ro   r|   r   ©r    r¥  rž   r¤  s      @r!   Útest_runUntilFailureDecorateÚ.UntilFailureTests.test_runUntilFailureDecorated  s}   ø€ ð
 ˆ	õ	ð 	�
‰
”8˜Z¨Ô2Ø—‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,à×Ñœ˜Y›¨Ô+Ø×Ñ˜ d§i¡i´Ð%;Ð$<Õ=r$   c                 ó†  ^• / mU4S jnU R                  [        SU5        SU R                  l        U R                  R	                  U R
                  5      nU R                  UR                  S5        U R                  [        T5      S5        U R                  TU R
                  [        4U R
                  [        4/5        g)zs
C{runUntilFailure} applies the force-gc decoration after the standard
L{ITestCase} decoration, but only one time.
c                 ó,   >• TR                  X45        U $ r   r¡  r¢  s     €r!   r¥  ÚGUntilFailureTests.test_runUntilFailureForceGCDecorate.<locals>.decorate}  r§  r$   r¥  Tr'   r„   N)rr  r   r   Ú_forceGarbageCollectionr˜  rQ   r~   ro   r|   r   r   r¨  s      @r!   Ú#test_runUntilFailureForceGCDecorateÚ5UntilFailureTests.test_runUntilFailureForceGCDecoratev  s™   ø€ ð
 ˆ	õ	ð 	�
‰
”8˜Z¨Ô2Ø.2ˆ�‰Ô+Ø—‘×,Ñ,¨T¯Y©YÓ7ˆØ×Ñ˜Ÿ™¨!Ô,à×Ñœ˜Y›¨Ô+Ø×ÑØØ�i‰iœÐ# d§i¡iÔ1QÐ%RÐSõ	
r$   r¡   N)r-   r.   r/   r0   rÌ   rÜ   r“  r˜   r›  rš  r©  r¯  r1   r2   r$   r!   r‹  r‹  A  s,   † ô
-�F—O‘Oô 
-òPò7ò$ò>õ$
r$   r‹  c                   ó$   • \ rS rSrSrS rS rSrg)ÚUncleanUntilFailureTestsi�  z\
Test that the run-until-failure feature works correctly with the unclean
error suppressor.
c                 ó”   • [         R                  U 5        [        R                  " [        R
                  U R                  SS9U l        g )NTr¦   )r‹  r˜   r   r—   r   r•  r<   r   s    r!   r˜   ÚUncleanUntilFailureTests.setUp“  s3   € Ü×Ñ Ô%Ü×(Ò(Ü×Ñ d§k¡kÀ4ñ
ˆ�r$   c                 ó@   • [        UR                  R                  5      $ )zh
Get the number of failures that were reported to a result that
is wrapped in an UncleanFailureWrapper.
)r|   Ú_originalReporterrA  r�   s     r!   rš  Ú%UncleanUntilFailureTests._getFailures™  s   € ô
 �6×+Ñ+×4Ñ4Ó5Ð5r$   )r   N)r-   r.   r/   r0   rm   r˜   rš  r1   r2   r$   r!   r²  r²  �  s   † ñò

õ6r$   r²  c                   ó   • \ rS rSrSrS rSrg)ÚBreakingSuitei¡  z3
A L{TestSuite} that logs an error when it is run.
c                 óŒ   •  [        S5      e! [          a,    [        R                  " [        R                  " 5       5         g f = f)Nz#error that occurs outside of a test)ÚRuntimeErrorr   Úerrr
   ÚFailurer�   s     r!   r}   ÚBreakingSuite.run¦  s5   € ð	'ÜÐDÓEÐEøÜó 	'Ü�GŠG”G—O’OÓ%Ö&ð	'ús   ‚ �3AÁAr2   N)r-   r.   r/   r0   rm   r}   r1   r2   r$   r!   r¹  r¹  ¡  s   † ñõ'r$   r¹  c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚLoggedErrorsTestsi­  zù
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                 ó.   • U R                  [        5        g r   )ÚflushLoggedErrorsr»  r   s    r!   r  ÚLoggedErrorsTests.tearDownµ  s   € Ø×Ñœ|Õ,r$   c                 ón   • [         R                  " 5       nU R                  UR                  5       S5        g)zO
Check that we can construct a L{runner.LoggedSuite} and that it
starts empty.
r   N)r   ÚLoggedSuiter~   ÚcountTestCases)r    rÍ   s     r!   Útest_constructÚ LoggedErrorsTests.test_construct¸  s+   € ô
 ×"Ò"Ó$ˆØ×Ñ˜×-Ñ-Ó/°Õ3r$   c                 ó¼  • [         R                  " 5       n[        R                  " [	        5       /5      nUR                  U5        U R                  [        UR                  5      S5        U R                  UR                  S   S   R                  5       [        R                  5        U R                  UR                  S   S   R                  [        5      5        g)zE
Chek that a L{LoggedSuite} reports any logged errors to its result.
r'   r   N)r   Ú
TestResultr   rÅ  r¹  r}   r~   r|   r@  ÚidÚNOT_IN_TESTrŠ   Úcheckr»  )r    rž   rÍ   s      r!   Útest_capturesErrorÚ$LoggedErrorsTests.test_capturesErrorÀ  sž   € ô ×$Ò$Ó&ˆÜ×"Ò"¤M£OÐ#4Ó5ˆØ�	‰	�&ÔØ×Ñœ˜VŸ]™]Ó+¨QÔ/Ø×Ñ˜Ÿ™ qÑ)¨!Ñ,×/Ñ/Ó1´6×3EÑ3EÔFØ�‰˜Ÿ™ aÑ(¨Ñ+×1Ñ1´,Ó?Õ@r$   r2   N)	r-   r.   r/   r0   rm   r  rÇ  rÎ  r1   r2   r$   r!   rÀ  rÀ  ­  s   † ñò-ò4õ	Ar$   rÀ  c                   ó,   • \ rS rSrS rS rS rS rSrg)ÚTestHolderTestsiÌ  c                 ó\   • SU l         [        R                  " U R                   5      U l        g ©Nrì   )rì   r   Ú
TestHolderÚholderr   s    r!   r˜   ÚTestHolderTests.setUpÍ  s"   € Ø(ˆÔÜ×'Ò'¨×(8Ñ(8Ó9ˆ�r$   c                 óÔ   • U R                  U R                  R                  5       U R                  5        U R                  U R                  R	                  5       U R                  5        g)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)r~   rÕ  rË  rì   ÚshortDescriptionr   s    r!   Útest_holderÚTestHolderTests.test_holderÑ  sH   € ð 	×Ñ˜Ÿ™Ÿ™Ó)¨4×+;Ñ+;Ô<Ø×Ñ˜Ÿ™×5Ñ5Ó7¸×9IÑ9IÕJr$   c                 óâ   • U R                  U R                  [        U R                  5      5        U R                  [	        [        U R                  5      U R                  < S[        < S35        g)z/
L{runner.TestHolder} implements L{ITestCase}.
z claims to provide z but does not do so correctly.N)rœ   rÕ  r   rŠ   r   r   s    r!   Útest_holderImplementsITestCaseÚ.TestHolderTests.test_holderImplementsITestCaseÚ  sI   € ð 	×Ñ˜TŸ[™[¬)°D·K±KÓ*@ÔAØ�‰Üœ D§K¡KÓ0à�{Œ{ŸIð'õ	
r$   c                 óÚ   • [         R                  " 5       nU R                  R                  U5        U R	                  UR                  5       5        U R                  SUR                  5        g)zK
A L{runner.TestHolder} can run against the standard Python
C{TestResult}.
r'   N)rÌ   rÊ  rÕ  r}   rŠ   rk   r~   ro   r�   s     r!   Útest_runsWithStandardResultÚ+TestHolderTests.test_runsWithStandardResultå  sK   € ô
 ×"Ò"Ó$ˆØ�‰�‰˜ÔØ�‰˜×,Ñ,Ó.Ô/Ø×Ñ˜˜FŸO™OÕ,r$   )rì   rÕ  N)	r-   r.   r/   r0   r˜   rÙ  rÜ  rß  r1   r2   r$   r!   rÑ  rÑ  Ì  s   † ò:òKò	
õ-r$   rÑ  c                   óZ   • \ rS rSrSr\" S5      r " S S5      rS rS r	S r
S	 rS
 rSrg)ÚErrorHolderTestsMixinið  aE  
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                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	Ú$ErrorHolderTestsMixin.TestResultStubiý  z
Stub for L{TestResult}.
c                 ó   • / U l         g r   ©r@  r   s    r!   r"   Ú-ErrorHolderTestsMixin.TestResultStub.__init__  s	   € ØˆD�Kr$   c                 ó   • g r   r2   rP   s     r!   rB   Ú.ErrorHolderTestsMixin.TestResultStub.startTest  ó   € Ør$   c                 ó   • g r   r2   rP   s     r!   rG   Ú-ErrorHolderTestsMixin.TestResultStub.stopTest  rê  r$   c                 ó<   • U R                   R                  X45        g r   )r@  r)   rX   s      r!   rZ   Ú-ErrorHolderTestsMixin.TestResultStub.addError  s   € Ø�K‰K×Ñ ˜}Õ-r$   ræ  N)
r-   r.   r/   r0   rm   r"   rB   rG   rZ   r1   r2   r$   r!   ÚTestResultStubrä  ý  s   † ñ	ò	ò	ò	õ	.r$   rï  c                 óÚ   • [         R                  " 5       nU R                  R                  U5        U R	                  UR                  5       5        U R                  SUR                  5        g)zL
A L{runner.ErrorHolder} can run against the standard Python
C{TestResult}.
r'   N)rÌ   rÊ  rÕ  r}   r™  rk   r~   ro   r�   s     r!   rß  Ú1ErrorHolderTestsMixin.test_runsWithStandardResult  sM   € ô
 ×"Ò"Ó$ˆØ�‰�‰˜ÔØ×Ñ˜×-Ñ-Ó/Ô0Ø×Ñ˜˜FŸO™OÕ,r$   c                 ó2  • U R                   R                  U R                  5        U R                  U R                  R                  U R                   U R
                  R                  U R
                  R                  U R
                  R                  44/5        g)z=
L{runner.ErrorHolder} adds an error to the result when run.
N)	rÕ  r}   rž   r~   r@  rY   ÚtypeÚvalueÚtbr   s    r!   Útest_runÚErrorHolderTestsMixin.test_run  sc   € ð 	�‰�‰˜Ÿ™Ô$Ø×ÑØ�K‰K×ÑØ�k‰k˜DŸJ™JŸO™O¨T¯Z©Z×-=Ñ-=¸t¿z¹z¿}¹}ÐMÐNÐOõ	
r$   c                 ó  • U R                  U R                  5        U R                  U R                  R                  U R                   U R                  R
                  U R                  R                  U R                  R                  44/5        g)z@
L{runner.ErrorHolder} adds an error to the result when called.
N)rÕ  rž   r~   r@  rY   ró  rô  rõ  r   s    r!   Ú	test_callÚ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   • U R                  U R                  R                  5       S5        g)z8
L{runner.ErrorHolder.countTestCases} always returns 0.
r   N)r~   rÕ  rÆ  r   s    r!   Útest_countTestCasesÚ)ErrorHolderTestsMixin.test_countTestCases,  s!   € ð 	×Ñ˜Ÿ™×3Ñ3Ó5°qÕ9r$   c                 ó°   • SR                  [        U R                  R                  S   5      5      nU R	                  [        U R                  5      U5        g)zP
L{runner.ErrorHolder.__repr__} returns a string describing the error it
holds.
z0<ErrorHolder description='description' error={}>r'   N)ÚformatÚreprrÕ  rY   r~   )r    Úexpecteds     r!   Ú	test_reprÚErrorHolderTestsMixin.test_repr2  sG   € ð
 I×OÑOÜ�—‘×"Ñ" 1Ñ%Ó&ó
ˆð 	×Ñœ˜dŸk™kÓ*¨HÕ5r$   r2   N)r-   r.   r/   r0   rm   ÚZeroDivisionErrorÚexceptionForTestsrï  rß  rö  rù  rü  r  r1   r2   r$   r!   râ  râ  ð  s8   † ññ *Ð*NÓOÐ÷.ñ .ò"-ò
ò
ò:õ	6r$   râ  c                   ó   • \ rS rSrSrS rSrg)ÚFailureHoldingErrorHolderTestsi>  z‡
Tests for L{runner.ErrorHolder} behaving similarly to L{runner.TestHolder}
when constructed with a L{Failure} representing its error.
c                 ó
  • SU l          U R                  e! [         a    [        R                  " 5       U l         Of = f[        R                  " U R                   U R
                  5      U l        U R                  5       U l
        g rÓ  )rì   r  r  r
   r½  rY   r   ÚErrorHolderrÕ  rï  rž   r   s    r!   r˜   Ú$FailureHoldingErrorHolderTests.setUpD  sf   € Ø(ˆÔð	+Ø×(Ñ(Ð(øÜ ó 	+Ü ŸšÓ*ˆDŽJð	+úä×(Ò(¨×)9Ñ)9¸4¿:¹:ÓFˆŒØ×)Ñ)Ó+ˆ�s   ‰ •$<»<©rì   rY   rÕ  rž   Nr©   r2   r$   r!   r  r  >  s   † ñõ
,r$   r  c                   ó   • \ rS rSrSrS rSrg)ÚExcInfoHoldingErrorHolderTestsiO  z”
Tests for L{runner.ErrorHolder} behaving similarly to L{runner.TestHolder}
when constructed with a C{exc_info}-style tuple representing its error.
c                 ó   • SU l          U R                  e! [         a2    [        R                  " 5       n[
        R                  " 5       U l         Of = f[        R                  " U R                   U5      U l
        U R                  5       U l        g rÓ  )rì   r  r  ÚsysÚexc_infor
   r½  rY   r   r	  rÕ  rï  rž   )r    ÚexceptionInfos     r!   r˜   Ú$ExcInfoHoldingErrorHolderTests.setUpU  so   € Ø(ˆÔð	+Ø×(Ñ(Ð(øÜ ó 	+ÜŸLšL›NˆMÜ ŸšÓ*ˆDŽJð	+úô ×(Ò(¨×)9Ñ)9¸=ÓIˆŒØ×)Ñ)Ó+ˆ�s   ‰ •9AÁAr  Nr©   r2   r$   r!   r  r  O  s   † ñõ
	,r$   r  c                   óZ   • \ rS rSrSr " S S\R                  5      rS rS r	S r
S rS	rg
)ÚMalformedMethodTestsia  zJ
Test that trial manages when test methods don't have correct signatures.
c                   óH   • \ rS rSrSrS rS r\R                  " \5      r	Sr
g)Ú%MalformedMethodTests.ContainMalformedif  zF
This TestCase holds malformed test methods that trial should handle.
c                 ó   • g r   r2   )r    Úblahs     r!   rÅ   Ú.MalformedMethodTests.ContainMalformed.test_fook  rê  r$   c                  ó   • g r   r2   r2   r$   r!   Útest_barÚ.MalformedMethodTests.ContainMalformed.test_barn  rê  r$   r2   N)r-   r.   r/   r0   rm   rÅ   r  r   ÚinlineCallbacksÚ	test_spamr1   r2   r$   r!   ÚContainMalformedr  f  s#   † ñ	ò	ò	ð ×)Ò)¨(Ó3‹	r$   r  c                 ój  • [        5       n[        R                  " [        R                  US9n[
        R                  U5      nUR                  U5      nU R                  UR                  S5        U R                  UR                  5       5        U R                  [        UR                  5      S5        g)z<
Wrapper for one of the test method of L{ContainMalformed}.
r•   r'   N)r   r   r—   r   r•  r  r  r}   r~   ro   r™  rk   r|   r@  )r    rD   r<   ÚtrialRunnerrQ   rž   s         r!   Ú_testÚMalformedMethodTests._tests  s…   € ô “ˆÜ×(Ò(¬×):Ñ):À6ÑJˆÜ#×4Ñ4°VÓ<ˆØ—‘ Ó&ˆØ×Ñ˜Ÿ™¨!Ô,Ø×Ñ˜×-Ñ-Ó/Ô0Ø×Ñœ˜VŸ]™]Ó+¨QÕ/r$   c                 ó&   • U R                  S5        g)z5
Test when the method has extra (useless) arguments.
rÅ   N©r"  r   s    r!   Útest_extraArgÚ"MalformedMethodTests.test_extraArg  ó   € ð 	�
‰
�:Õr$   c                 ó&   • U R                  S5        g)z:
Test when the method doesn't have even self as argument.
r  Nr%  r   s    r!   Ú
test_noArgÚMalformedMethodTests.test_noArg…  r(  r$   c                 ó&   • U R                  S5        g)z%
Test a decorated method also fails.
r  Nr%  r   s    r!   Útest_decoratedÚ#MalformedMethodTests.test_decorated‹  s   € ð 	�
‰
�;Õr$   r2   N)r-   r.   r/   r0   rm   rÌ   rÜ   r  r"  r&  r*  r-  r1   r2   r$   r!   r  r  a  s+   † ñô4˜6Ÿ?™?ô 4ò
0òòõ r$   r  c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚDestructiveTestSuiteTestsi’  z*
Test for L{runner.DestructiveTestSuite}.
c                 óV  ^• / m " U4S jS[         R                  5      nU" S5      n[        R                  " 5       n[        R
                  " U/5      nU R                  T/ 5        UR                  U5        U R                  TS/5        U R                  UR                  5       S5        g)z<
Thes destructive test suite should run the tests normally.
c                   ó"   >• \ rS rSrU 4S jrSrg)Ú6DestructiveTestSuiteTests.test_basic.<locals>.MockTesti�  c                 ó(   >• TR                  S5        g rj  r¡  ©rQ   Úcalleds    €r!   rÅ   Ú?DestructiveTestSuiteTests.test_basic.<locals>.MockTest.test_foož  s   ø€ Ø—‘˜dÕ#r$   r2   NrÈ   ©r6  s   €r!   rÛ   r3  �  s   ø† ÷$ð $r$   rÛ   rÅ   Tr   N)	rÌ   rÜ   r   rÊ  r   ÚDestructiveTestSuiter~   r}   rÆ  )r    rÛ   rQ   rž   rÍ   r6  s        @r!   Ú
test_basicÚ$DestructiveTestSuiteTests.test_basic—  s�   ø€ ð ˆ÷	$”v—‘ô 	$ñ ˜
Ó#ˆÜ×$Ò$Ó&ˆÜ×+Ò+¨T¨FÓ3ˆØ×Ñ˜ Ô$Ø�	‰	�&ÔØ×Ñ˜ $ Ô(Ø×Ñ˜×-Ñ-Ó/°Õ3r$   c                 óŽ  ^• / m " U4S jS[         R                  5      n[        R                  " 5       n[        R
                  " 5       n[        R                  Ul        UR                  U5      nU R                  T/ 5        UR                  U5        U R                  TS/5        U R                  UR                  5       S5        g)z]
Test the C{shouldStop} management: raising a C{KeyboardInterrupt} must
interrupt the suite.
c                   ó4   >• \ rS rSrU 4S jrS rU 4S jrSrg)Ú;DestructiveTestSuiteTests.test_shouldStop.<locals>.MockTesti°  c                 ó(   >• TR                  S5        g )Nr'   r¡  r5  s    €r!   Ú	test_foo1ÚEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo1±  ó   ø€ Ø—‘˜aÕ r$   c                 ó   • [        5       er   )ÚKeyboardInterrupt©rQ   s    r!   Ú	test_foo2ÚEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo2´  s   € Ü'Ó)Ð)r$   c                 ó(   >• TR                  S5        g )Nr„   r¡  r5  s    €r!   Ú	test_foo3ÚEDestructiveTestSuiteTests.test_shouldStop.<locals>.MockTest.test_foo3·  rB  r$   r2   N)r-   r.   r/   r0   r@  rF  rI  r1   r8  s   €r!   rÛ   r>  °  s   ø† õ!ò*÷!ð !r$   rÛ   r'   N)r   rÜ   r   rÊ  r   rY  r9  ÚsuiteFactoryÚ	loadClassr~   r}   rÆ  )r    rÛ   rž   r\  rÍ   r6  s        @r!   Útest_shouldStopÚ)DestructiveTestSuiteTests.test_shouldStop©  sŸ   ø€ ð
 ˆ÷	!”x×(Ñ(ô 	!ô ×$Ò$Ó&ˆÜ×"Ò"Ó$ˆÜ$×9Ñ9ˆÔØ× Ñ  Ó*ˆØ×Ñ˜ Ô$Ø�	‰	�&ÔØ×Ñ˜ ! Ô%à×Ñ˜×-Ñ-Ó/°Õ3r$   c                 ó@  •  " S S[         R                  5      nU" S5      n[        R                  " 5       n[        R
                  " U/5      nU R                  UR                  5       S5        UR                  U5        U R                  UR                  5       S5        g)zV
Checks that the test suite cleanups its tests during the run, so that
it ends empty.
c                   ó   • \ rS rSrS rSrg)Ú8DestructiveTestSuiteTests.test_cleanup.<locals>.MockTestiÊ  c                 ó   • g r   r2   rE  s    r!   rÅ   ÚADestructiveTestSuiteTests.test_cleanup.<locals>.MockTest.test_fooË  rÇ   r$   r2   NrÈ   r2   r$   r!   rÛ   rQ  Ê  rÊ   r$   rÛ   rÅ   r'   r   N)	rÌ   rÜ   r   rÊ  r   r9  r~   rÆ  r}   )r    rÛ   rQ   rž   rÍ   s        r!   Útest_cleanupÚ&DestructiveTestSuiteTests.test_cleanupÄ  s|   € ô	”v—‘ô 	ñ ˜
Ó#ˆÜ×$Ò$Ó&ˆÜ×+Ò+¨T¨FÓ3ˆØ×Ñ˜×-Ñ-Ó/°Ô3Ø�	‰	�&ÔØ×Ñ˜×-Ñ-Ó/°Õ3r$   r2   N)	r-   r.   r/   r0   rm   r:  rM  rT  r1   r2   r$   r!   r0  r0  ’  s   † ñò4ò$4õ64r$   r0  c                   ó>   • \ rS rSr " S S\R
                  5      rSrg)ÚRunnerDeprecationTestsiÖ  c                   ó<   • \ rS rSrSrSrSrSrS rS r	S r
S rSrg)	Ú#RunnerDeprecationTests.FakeReporteri×  z›
Fake reporter that does *not* implement done() but *does* implement
printErrors, separator, printSummary, stream, write and writeln
without deprecations.
Nc                 ó   • g r   r2   r	  s     r!   ÚprintErrorsÚ/RunnerDeprecationTests.FakeReporter.printErrorsâ  rê  r$   c                 ó   • g r   r2   r	  s     r!   ÚprintSummaryÚ0RunnerDeprecationTests.FakeReporter.printSummaryå  rê  r$   c                 ó   • g r   r2   r	  s     r!   ÚwriteÚ)RunnerDeprecationTests.FakeReporter.writeè  rê  r$   c                 ó   • g r   r2   r	  s     r!   ÚwritelnÚ+RunnerDeprecationTests.FakeReporter.writelnë  rê  r$   r2   )r-   r.   r/   r0   rm   rT   rn   r<   r[  r^  ra  rd  r1   r2   r$   r!   ÚFakeReporterrY  ×  s,   † ñ	ð ˆØˆ	Øˆò	ò	ò	õ	r$   rf  r2   N)r-   r.   r/   r0   r   r•  rf  r1   r2   r$   r!   rW  rW  Ö  s   † ô�x×(Ñ(÷ r$   rW  c                   ó   • \ rS rSrSrS rSrg)ÚQualifiedNameWalkerTestsiï  z4
Tests for L{twisted.trial.runner._qualNameWalker}.
c                 ó~   • [        [        R                  " S5      5      nU R                  US/ 4SS/4SSS/4/5        g)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   Ú_qualNameWalkerr~   )r    ÚwalkerResultss     r!   Útest_walksDownPathÚ+QualifiedNameWalkerTests.test_walksDownPathô  sO   € ô œV×3Ò3Ð4IÓJÓKˆà×ÑØà&¨Ð+Ø ( Ð,Ø˜G XÐ.Ð/ðõ	
r$   r2   N)r-   r.   r/   r0   rm   ro  r1   r2   r$   r!   rh  rh  ï  s   † ñõ
r$   rh  c                   ó   • \ rS rSrSrS rSrg)ÚTrialMainDoesNothingTestsi  z`
Importing L{twisted.trial.__main__} will not run the script
unless it is actually C{__main__}.
c                 ó   • [        S5        g)z?
If we import L{twisted.trial.__main__}, it should do nothing.
ztwisted.trial.__main__N)Ú
__import__r   s    r!   Útest_importDoesNothingÚ0TrialMainDoesNothingTests.test_importDoesNothing  s   € ô
 	Ð+Õ,r$   r2   N)r-   r.   r/   r0   rm   ru  r1   r2   r$   r!   rr  rr    s   † ñõ
-r$   rr  )@r.  rn  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   r4   rq   rË   r’   r£   r«   r¾   rÔ   rß   rç   r†  r‹  r²  r´   r¹  rÀ  rÑ  râ  r  r  r  r0  rW  rh  rr  r2   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$   