
    h6                     h    S r SSKJr   " S S\R                  5      r " S S\R                  5      rg)z3
Interfaces for Trial.

Maintainer: Jonathan Lange
    Nc                   Z    \ rS rSrSr\R                  " S5      rS rS r	S r
S rS rS	rg
)	ITestCase   zM
The interface that a test case must implement in order to be used in Trial.
z7The exception class that is raised by failed assertionsc                     g)zA
Run the test. Should always do exactly the same thing as run().
N results    [/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/trial/itrial.py__call__ITestCase.__call__           c                      g)z:
Return the number of tests in this test case. Usually 1.
Nr   r   r   r
   countTestCasesITestCase.countTestCases   r   r   c                      g)zS
Return a unique identifier for the test, usually the fully-qualified
Python name.
Nr   r   r   r
   idITestCase.id!   r   r   c                     g)zR
Run the test, storing the results in C{result}.

@param result: A L{TestResult}.
Nr   r   s    r
   runITestCase.run'   r   r   c                      g)z)
Return a short description of the test.
Nr   r   r   r
   shortDescriptionITestCase.shortDescription.   r   r   r   N)__name__
__module____qualname____firstlineno____doc__zi	AttributefailureExceptionr   r   r   r   r   __static_attributes__r   r   r
   r   r      s4     ||A

r   r   c                       \ rS rSrSr\R                  " S5      r\R                  " S5      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Srg
)	IReporter4   z.
I report results from a run of a test suite.
zHA boolean indicating that this reporter would like the test run to stop.zd
        The number of tests that seem to have been run according to this
        reporter.
        c                     g)zs
Report the beginning of a run of a single test method.

@param method: an object that is adaptable to ITestMethod
Nr   methods    r
   	startTestIReporter.startTestC   r   r   c                     g)zf
Report the status of a single test method

@param method: an object that is adaptable to ITestMethod
Nr   r(   s    r
   stopTestIReporter.stopTestJ   r   r   c                     g)z
Record that test passed.
Nr   )tests    r
   
addSuccessIReporter.addSuccessQ   r   r   c                     g)a  
Record that a test has raised an unexpected exception.

@param test: The test that has raised an error.
@param error: The error that the test raised. It will either be a
    three-tuple in the style of C{sys.exc_info()} or a
    L{Failure<twisted.python.failure.Failure>} object.
Nr   )r0   errors     r
   addErrorIReporter.addErrorV   r   r   c                     g)a  
Record that a test has failed with the given failure.

@param test: The test that has failed.
@param failure: The failure that the test failed with. It will
    either be a three-tuple in the style of C{sys.exc_info()}
    or a L{Failure<twisted.python.failure.Failure>} object.
Nr   )r0   failures     r
   
addFailureIReporter.addFailure`   r   r   Nc                     g)a  
Record that the given test failed, and was expected to do so.

In Twisted 15.5 and prior, C{todo} was a mandatory parameter.

@type test: L{unittest.TestCase}
@param test: The test which this is about.
@type failure: L{failure.Failure}
@param failure: The error which this test failed with.
@type todo: L{unittest.Todo}
@param todo: The reason for the test's TODO status. If L{None}, a
    generic reason is used.
Nr   )r0   r8   todos      r
   addExpectedFailureIReporter.addExpectedFailurej   r   r   c                     g)aF  
Record that the given test failed, and was expected to do so.

In Twisted 15.5 and prior, C{todo} was a mandatory parameter.

@type test: L{unittest.TestCase}
@param test: The test which this is about.
@type todo: L{unittest.Todo}
@param todo: The reason for the test's TODO status. If L{None}, a
    generic reason is used.
Nr   )r0   r<   s     r
   addUnexpectedSuccessIReporter.addUnexpectedSuccessy   r   r   c                     g)z
Record that a test has been skipped for the given reason.

@param test: The test that has been skipped.
@param reason: An object that the test case has specified as the reason
    for skipping the test.
Nr   )r0   reasons     r
   addSkipIReporter.addSkip   r   r   c                      g)zr
Return a boolean indicating whether all test results that were reported
to this reporter were successful or not.
Nr   r   r   r
   wasSuccessfulIReporter.wasSuccessful   r   r   c                      g)a  
Called when the test run is complete.

This gives the result object an opportunity to display a summary of
information to the user. Once you have called C{done} on an
L{IReporter} object, you should assume that the L{IReporter} object is
no longer usable.
Nr   r   r   r
   doneIReporter.done   r   r   r   )N)r   r   r   r   r   r    r!   
shouldStoptestsRunr*   r-   r1   r5   r9   r=   r@   rD   rG   rJ   r#   r   r   r
   r%   r%   4   sa     UJ ||	H
r   r%   )r   zope.interface	interfacer    	Interfacer   r%   r   r   r
   <module>rQ      s2    # #Li ir   