Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/trial/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyc


|Nc"@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZ
ddlmZmZddlmZmZmZmZddlmZddlmZmZmZed	Zdd
lmZde fdYZ!d
e"fdYZ#de$fdYZ%dZ&de$fdYZ'dZ(dZ)dej*e$fdYZ+de$fdYZ,e,Z-gZ.de+fdYZ*de fdYZ/de$fdYZ0d Z1d!ej2fd"YZ2d#ej3ej4d$fd%YZ5d&Z6d'Z7d(e5fd)YZ8d*e8fd+YZ9d,e5fd-YZ:ej;e8ej*ej4ej;e9ej<ej4e=ed.e>Z?e?rej;e9e?ej4nd/Z@yeAej2Wn&eBk
r?d0ZCeCej2_CnXd1e*fd2YZDeDZEd3ZFd4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUg"ZGx!eGD]ZHeFeHeIeH<qWdd
dgZJdS(VsP
Things likely to be used by writers of unit tests.

Maintainer: Jonathan Lange
iN(tpformat(tfindlinestarts(tdefertutils(t
componentstfailuretlogtmonkey(tgetDeprecationWarningString(titrialtreportertutiltunittest(t
implementstSkipTestcBseZdZRS(s
    Raise this (with a reason) to skip the current test. You may also set
    method.skip to a reason string to skip it, or set class.skip to skip the
    entire TestCase.
    (t__name__t
__module__t__doc__(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRstFailTestcBseZdZRS(s7Raised to indicate the current test has failed to pass.(RRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR%stTodocBs,eZdZddZdZdZRS(sK
    Internal object used to mark a L{TestCase} as 'todo'. Tests marked 'todo'
    are reported differently in Trial L{TestResult}s. If todo'd tests fail,
    they do not fail the suite and the errors are reported in a separate
    category. If todo'd tests succeed, Trial L{TestResult}s will report an
    unexpected success.
    cCs||_||_dS(sr
        @param reason: A string explaining why the test is marked 'todo'

        @param errors: An iterable of exception types that the test is
        expected to raise. If one of these errors is raised by the test, it
        will be trapped. Raising any other kind of error will fail the test.
        If C{None} is passed, then all errors will be trapped.
        N(treasonterrors(tselfRR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__init__2s		cCsd|j|jfS(Ns<Todo reason=%r errors=%r>(RR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__repr__>scCs>|jdkrtSx$|jD]}|j|rtSqWtS(s
        @param failure: A L{twisted.python.failure.Failure}.

        @return: C{True} if C{failure} is expected, C{False} otherwise.
        N(RtNonetTruetchecktFalse(RRterror((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytexpectedAsN(RRRRRRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR)s	cCs{t|trtd|St|trw|\}}yt|}Wntk
rc|g}nXtd|d|SdS(s
    Return a L{Todo} object built from C{value}.

    If C{value} is a string, return a Todo that expects any exception with
    C{value} as a reason. If C{value} is a tuple, the second element is used
    as the reason and the first element as the excepted error(s).

    @param value: A string or a tuple of C{(errors, reason)}, where C{errors}
    is either a single exception class or an iterable of exception classes.

    @return: A L{Todo} object.
    RRN(t
isinstancetstrRttupletlistt	TypeError(tvalueRR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytmakeTodoOs



t_WarningcBseZdZdZRS(s]
    A L{_Warning} instance represents one warning emitted through the Python
    warning system (L{warnings}).  This is used to insulate callers of
    L{_collectWarnings} from changes to the Python warnings system which might
    otherwise require changes to the warning objects that function passes to
    the observer object it accepts.

    @ivar message: The string which was passed as the message parameter to
        L{warnings.warn}.

    @ivar category: The L{Warning} subclass which was passed as the category
        parameter to L{warnings.warn}.

    @ivar filename: The name of the file containing the definition of the code
        object which was C{stacklevel} frames above the call to
        L{warnings.warn}, where C{stacklevel} is the value of the C{stacklevel}
        parameter passed to L{warnings.warn}.

    @ivar lineno: The source line associated with the active instruction of the
        code object object which was C{stacklevel} frames above the call to
        L{warnings.warn}, where C{stacklevel} is the value of the C{stacklevel}
        parameter passed to L{warnings.warn}.
    cCs(||_||_||_||_dS(N(tmessagetcategorytfilenametlineno(RR'R(R)R*((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs			(RRRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR&hscCsAx:|jD],}|dk	r
y
d|_Wq9q9Xq
q
WdS(s
    Disable the per-module cache for every module found in C{modules}, typically
    C{sys.modules}.

    @param modules: Dictionary of modules, typically sys.module dict
    N(tvaluesRt__warningregistry__(tmodulestv((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_setWarningRegistryToNones
csyddfd}ttjtj}tj}tjdz|t_|||}Wd|tj(|t_X|S(sU
    Call C{f} with C{args} positional arguments and C{kwargs} keyword arguments
    and collect all warnings which are emitted as a result in a list.

    @param observeWarning: A callable which will be invoked with a L{_Warning}
        instance each time a warning is emitted.

    @return: The return value of C{f(*args, **kwargs)}.
    cs9t|tstt|jd|||dS(Ni(RtWarningtAssertionErrorR&targs(R'R(R)R*tfiletline(tobserveWarning(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytshowWarningstalwaysN(RR/tsysR-twarningstfilterstshowwarningtsimplefilter(R5tfR2tkwargsR6torigFilterstorigShowtresult((R5s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_collectWarningss


	
	

t_AssertionscBseZdZddZddZeZZZddZ	e	Z
ZZdZ
e
ZddZeZZZddZeZddZeZdd	ZeZZZdd
ZeZddZeZddd
ZeZ Z!eZ"dddZ#e#Z$Z%e#Z&ddZ'e'Z(dZ)e)Z*ddZ+e+Z,ddZ-e-Z.dZ/e/Z0ddZ1e1Z2dZ3e3Z4RS(s]
    Replaces many of the built-in TestCase assertions. In general, these
    assertions provide better error messages and are easier to use in
    callbacks. Also provides new assertions such as L{failUnlessFailure}.

    Although the tests are defined as 'failIf*' and 'failUnless*', they can
    also be called as 'assertNot*' and 'assert*'.
    cCs|j|dS(s
        Absolutely fail the test.  Do not pass go, do not collect $200.

        @param msg: the message that will be displayed as the reason for the
        failure
        N(tfailureException(Rtmsg((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailscCs|r|j|n|S(s
        Fail the test if C{condition} evaluates to True.

        @param condition: any object that defines __nonzero__
        (RD(Rt	conditionRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfscCs|s|j|n|S(s
        Fail the test if C{condition} evaluates to False.

        @param condition: any object that defines __nonzero__
        (RD(RRGRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
failUnlessscOsy|||}WnO|k
r)}|S|jdtjd|jtjjfnX|jd|j|fdS(s9
        Fail the test unless calling the function C{f} with the given
        C{args} and C{kwargs} raises C{exception}. The failure will report
        the traceback and call stack of the unexpected exception.

        @param exception: exception type that is to be expected
        @param f: the function to call

        @return: The raised exception instance, if it is of the given type.
        @raise self.failureException: Raised if the function call does
            not raise an exception or if it raises an exception of a
            different type.
        s%s raised instead of %s:
 %sis%s not raised (%r returned)N(RDR8texc_infoRRtFailuretgetTraceback(Rt	exceptionR=R2R>RAtinst((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessRaisess	
	tcCso||ksk|dkr!d}nt|dkr@|d7}n|jd|t|t|fn|S(s
        Fail the test if C{first} and C{second} are not equal.

        @param msg: A string describing the failure that's included in the
            exception.
        RPis
s%snot equal:
a = %s
b = %s
N(RtlenRDR(RtfirsttsecondRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytassertEquals	
"cCs2||k	r.|j|p%d||fn|S(s
        Fail the test if C{first} is not C{second}.  This is an
        obect-identity-equality test, not an object equality
        (i.e. C{__eq__}) test.

        @param msg: if msg is None, then the failure message will be
        '%r is not %r' % (first, second)
        s%r is not %r(RD(RRRRSRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessIdenticals	"cCs2||kr.|j|p%d||fn|S(s
        Fail the test if C{first} is C{second}.  This is an
        obect-identity-equality test, not an object equality
        (i.e. C{__eq__}) test.

        @param msg: if msg is None, then the failure message will be
        '%r is %r' % (first, second)
        s%r is %r(RD(RRRRSRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfIdentical!s	"cCs2||ks.|j|p%d||fn|S(s
        Fail the test if C{first} == C{second}.

        @param msg: if msg is None, then the failure message will be
        '%r == %r' % (first, second)
        s%r == %r(RD(RRRRSRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfEqual/s"cCs2||kr.|j|p%d||fn|S(s
        Fail the test if C{containee} is not found in C{container}.

        @param containee: the value that should be in C{container}
        @param container: a sequence type, or in the case of a mapping type,
                          will follow semantics of 'if key in dict.keys()'
        @param msg: if msg is None, then the failure message will be
                    '%r not in %r' % (first, second)
        s%r not in %r(RD(Rt	containeet	containerRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessIn;s
cCs2||kr.|j|p%d||fn|S(s
        Fail the test if C{containee} is found in C{container}.

        @param containee: the value that should not be in C{container}
        @param container: a sequence type, or in the case of a mapping type,
                          will follow semantics of 'if key in dict.keys()'
        @param msg: if msg is None, then the failure message will be
                    '%r in %r' % (first, second)
        s%r in %r(RD(RRXRYRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfInKs
icCsBt|||dkr>|j|p5d|||fn|S(s
        Fail if the two objects are equal as determined by their
        difference rounded to the given number of decimal places
        (default 7) and comparing to zero.

        @note: decimal places (from zero) is usually not the same
               as significant digits (measured from the most
               signficant digit).

        @note: included for compatiblity with PyUnit test cases
        is%r == %r within %r places(troundRD(RRRRStplacesRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfAlmostEqual[scCsBt|||dkr>|j|p5d|||fn|S(s
        Fail if the two objects are unequal as determined by their
        difference rounded to the given number of decimal places
        (default 7) and comparing to zero.

        @note: decimal places (from zero) is usually not the same
               as significant digits (measured from the most
               signficant digit).

        @note: included for compatiblity with PyUnit test cases
        is%r != %r within %r places(R\RD(RRRRSR]RE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessAlmostEqualnscCs<t|||kr8|j|p/d||fn|S(s
        Fail if C{first} - C{second} > C{tolerance}

        @param msg: if msg is None, then the failure message will be
                    '%r ~== %r' % (first, second)
        s	%s ~== %s(tabsRD(RRRRSt	toleranceRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessApproximatess"cs1fd}fd}|j||S(s
        Fail if C{deferred} does not errback with one of C{expectedFailures}.
        Returns the original Deferred with callbacks added. You will need
        to return this Deferred from your test case.
        csjd|fdS(Ns&did not catch an error, instead got %r(RD(tignore(R(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_cbscs?|jr|jSdt|f}j|dS(Ns
Expected: %r
Got:
%s(RR$R RD(Rtoutput(RtexpectedFailures(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_ebs
(taddCallbacks(RtdeferredRfRdRg((RRfs:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessFailurescCs|j|||S(sH
        Fail if C{substring} does not exist within C{astring}.
        (RZ(Rt	substringtastringRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessSubstringscCs|j|||S(s;
        Fail if C{astring} contains C{substring}.
        (R[(RRkRlRE((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfSubstringscOsg}t|j|||}|s4|jdn|d}	xF|dD]:}
|
j|
jf|	j|	jfkrI|jdqIqIW|j|	j||j|	j||j|j|	j	d|	j	|f|S(s
        Fail if the given function doesn't generate the specified warning when
        called. It calls the function, checks the warning, and forwards the
        result of the function if everything is fine.

        @param category: the category of the warning to check.
        @param message: the output message of the warning to check.
        @param filename: the filename where the warning should come from.
        @param f: the function which is supposed to generate the warning.
        @type f: any callable.
        @param args: the arguments to C{f}.
        @param kwargs: the keywords arguments to C{f}.

        @return: the result of the original function C{f}.
        sNo warnings emittediisCan't handle different warningssWarning in %r, expected %r(
RBtappendRFR'R(RTtassertIdenticalRIt
startswithR)(RR(R'R)R=R2R>t
warningsShownRARRtother((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessWarnss
cCsOt||sK|dkr$d}n
d|}|jd|||fndS(s
        Fail if C{instance} is not an instance of the given class or of
        one of the given classes.

        @param instance: the object to test the type (first argument of the
            C{isinstance} call).
        @type instance: any.
        @param classOrTuple: the class or classes to test against (second
            argument of the C{isinstance} call).
        @type classOrTuple: class, type, or tuple.

        @param message: Custom text to include in the exception text if the
            assertion fails.
        RPs: s%r is not an instance of %s%sN(RRRF(RtinstancetclassOrTupleR'tsuffix((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailUnlessIsInstances	
	cCs-t||r)|jd||fndS(s
        Fail if C{instance} is not an instance of the given class or of
        one of the given classes.

        @param instance: the object to test the type (first argument of the
            C{isinstance} call).
        @type instance: any.
        @param classOrTuple: the class or classes to test against (second
            argument of the C{isinstance} call).
        @type classOrTuple: class, type, or tuple.
        s%r is an instance of %sN(RRF(RRuRv((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytfailIfIsInstancesN(5RRRRRFRHt	assertNottassertFalsetfailUnlessFalseRItassert_t
assertTruetfailUnlessTrueROtassertRaisesRTtfailUnlessEqualtfailUnlessEqualstassertEqualsRURpRVtassertNotIdenticalRWtassertNotEqualtassertNotEqualstfailIfEqualsRZtassertInR[tassertNotInR^tassertNotAlmostEqualtassertNotAlmostEqualstfailIfAlmostEqualsR_tassertAlmostEqualtassertAlmostEqualstfailUnlessAlmostEqualsRbtassertApproximatesRjt
assertFailureRmtassertSubstringRntassertNotSubstringRttassertWarnsRxtassertIsInstanceRytassertNotIsInstance(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRCsP				



		*	t_LogObservercBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	s
    Observes the Twisted logs and catches any errors.

    @ivar _errors: A C{list} of L{Failure} instances which were received as
        error events from the Twisted logging system.

    @ivar _added: A C{int} giving the number of times C{_add} has been called
        less the number of times C{_remove} has been called; used to only add
        this observer to the Twisted logging since once, regardless of the
        number of calls to the add method.

    @ivar _ignored: A C{list} of exception types which will not be recorded.
    cCsg|_d|_g|_dS(Ni(t_errorst_addedt_ignored(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs		cCs|jdkrmtj|jtj|j|_t_tj|j|_	t_tj
|j
|_t_
n|jd7_dS(Nii(RRtaddObservertgotEventt_flushErrorstflushErrorst_oldFEt_ignoret
_ignoreErrorst_oldIEt
_clearIgnorest_oldCI(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_addscCsY|jd8_|jdkrUtj|j|jt_|jt_|jt_	ndS(Nii(
RRtremoveObserverRRRRRRR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_remove"scGs|jj|dS(sF
        Do not store any errors with any of the given types.
        N(Rtextend(Rt
errorTypes((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR+scCs
g|_dS(sJ
        Stop ignoring any errors we might currently be ignoring.
        N(R(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR2scGst|r^g}g}x=|jD]2}|j|rA|j|q|j|qW||_n|j}g|_|S(s
        Flush errors from the list of caught errors. If no arguments are
        specified, remove all errors. If arguments are specified, only remove
        errors of those types from the stored list.
        (RRRo(RRtflushedt	remainderR=((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR9s		cCs|jS(sB
        Return a list of errors caught by this observer.
        (R(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt	getErrorsNscCsj|jdtrfd|krf|d}t|jdksP|j|jrf|jj|qfndS(s
        The actual observer method. Called whenever a message is logged.

        @param event: A dictionary containing the log message. Actual
        structure undocumented (see source for L{twisted.python.log}).
        tisErrorRiN(tgetRRQRRRRo(RteventR=((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRUs
((RRRRRRRRRRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs
									tTestCasecBseZdZeejeZddZe	j
d*krOdZdZndZ
dZd	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZ d+dZ"dZ#dZ$dZ%dZ&d Z'd!Z(d"Z)d#Z*d$Z+d%Z,d&Z-d'Z.d(Z/e0d)Z1RS(,s
    A unit test. The atom of the unit testing universe.

    This class extends C{unittest.TestCase} from the standard library. The
    main feature is the ability to return C{Deferred}s from tests and fixture
    methods and to have the suite wait for those C{Deferred}s to fire.

    To write a unit test, subclass C{TestCase} and define a method (say,
    'test_foo') on the subclass. To run the test, instantiate your subclass
    with the name of the method, and call L{run} on the instance, passing a
    L{TestResult} object.

    The C{trial} script will automatically find any C{TestCase} subclasses
    defined in modules beginning with 'test_' and construct test cases for all
    methods beginning with 'test'.

    If an error is logged during the test run, the test will fail with an
    error. See L{log.err}.

    @ivar failureException: An exception class, defaulting to C{FailTest}. If
    the test method raises this exception, it will be reported as a failure,
    rather than an exception. All of the assertion methods raise this if the
    assertion fails.

    @ivar skip: C{None} or a string explaining why this test is to be
    skipped. If defined, the test will not be run. Instead, it will be
    reported to the result object as 'skipped' (if the C{TestResult} supports
    skipping).

    @ivar suppress: C{None} or a list of tuples of C{(args, kwargs)} to be
    passed to C{warnings.filterwarnings}. Use these to suppress warnings
    raised in a test. Useful for testing deprecated code. See also
    L{util.suppress}.

    @ivar timeout: A real number of seconds. If set, the test will
    raise an error if it takes longer than C{timeout} seconds.
    If not set, util.DEFAULT_TIMEOUT_DURATION is used.

    @ivar todo: C{None}, a string or a tuple of C{(errors, reason)} where
    C{errors} is either an exception class or an iterable of exception
    classes, and C{reason} is a string. See L{Todo} or L{makeTodo} for more
    information.
    trunTestcCsltt|j|||_t||}||g|_|jjtj|t	|_
g|_dS(s
        Construct an asynchronous test case for C{methodName}.

        @param methodName: The name of a method on C{self}. This method should
        be a unit test. That is, it should be a short method that calls some of
        the assert* methods. If C{methodName} is unspecified, L{runTest} will
        be used as the test method. This is mostly useful for testing Trial.
        N(tsuperRRt_testMethodNametgetattrt_parentsRRtgetPythonContainersRt_passedt	_cleanups(Rt
methodNamet
testMethod((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs			iicCs
||kS(N((RRs((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__eq__scCs
||k	S(N((RRs((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__ne__scsddlmjfd}tj|tjdt}t}t	j
tjj|}j
|||jfd|S(Ni(treactorcstjdf}tj|}y|j|Wnttjk
rjt_j	}|dk	r|j|rj||qj
|nXdS(Ns %r (%s) still running at %s secs(RtTimeoutErrorRRKterrbacktAlreadyCalledErrortcrashRt	_timedOuttgetTodoRRtaddExpectedFailuretaddError(tdteR=ttodo(RRAttimeoutRR(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt	onTimeouts	
	R(csjrjp|S(N(tactivetcancel(tx(tcall(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt<lambda>s(ttwisted.internetRt
getTimeoutRtsuppressWarningsRtsuppresstDeprecationWarningRRt
maybeDeferredtrunWithWarningsSuppressedtgetSuppresst	callLatertaddBoth(RRRARtmethodR((RRRRRRAs:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_runscCs,tt|j}|dkr(|jS|S(N(RRtshortDescriptionRR(Rtdesc((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscOs|j||S(N(trun(RR2R>((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__call__scCs>|jd|}|j|j|jd|fd|f|S(NtsetUptcallbackArgsterrbackArgs(RRhtdeferTestMethodt
_ebDeferSetUp(RtignoredRAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
deferSetUps
	
cCsg|jtr+|j||j|n,|j|||jtrW|jn|jd|S(N(	RRtaddSkipt
_getReasonRtKeyboardInterrupttstoptdeferRunCleanupsR(RRRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs
cCsg|j|j|}|j|j|jd|fd|f|j|j||j|j||S(NRR(RRRht_cbDeferTestMethodt_ebDeferTestMethodRRt
deferTearDown(RRRAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs	
cCs8|jdk	r+|j||jn	t|_|S(N(RRtaddUnexpectedSuccessRR(RRRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs	cCs|j}|dk	r=|j|r=|j|||n|j|jtre|j||ng|jtr|j	|||j
n;|jtr|j||j
|n|j	||dS(N(RRRRRRDRt
addFailureRRRRRR(RR=RAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs
cCs)|jd|}|j|j||S(NttearDown(Rt
addErrbackt_ebDeferTearDown(RRRAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCs9|j|||jtr,|jnt|_dS(N(RRRRRR(RRRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs
cCs#|j}|j|j||S(sd
        Run any scheduled cleanups and report errors (if any to the result
        object.
        (t_runCleanupstaddCallbackt_cbDeferRunCleanups(RRRAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCsbx[|D]S\}}|tjkr|j|||jtrN|jnt|_qqWdS(N(RtFAILURERRRRRR(RtcleanupResultsRAtflagR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR%s
cCsy.tj||j}|s-t|_nWn&|j|tjt|_nXx0|jj	D]}|j||t|_qgW|j
|j|jr|j|ndS(N(
Rt_JanitortpostCaseCleanupRRRRRKt	_observerRtflushLoggedErrorst_removeObservert
addSuccess(RRAtcleanR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_cleanUp-s



	cCs>ytj||jWn|j|tjnXdS(N(RRtpostClassCleanupRRRK(RRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
_classCleanUp=scsfd}|S(s
        Create a method which wraps the reactor method C{name}. The new
        method issues a deprecation warning and calls the original.
        cs7tjdfdddtj||S(Ns{reactor.%s cannot be used inside unit tests. In the future, using %s will fail the test and may crash or hang the test run.t
stackleveliR((R9twarnRt_reactorMethods(tatkw(tnameR(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_Hs	

((RR	R
((RR	s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_makeReactorMethodCscCsVi|_xFdddgD]5}t|||j|<t|||j|qWdS(s
        Deprecate C{iterate}, C{crash} and C{stop} on C{reactor}. That is,
        each method is wrapped in a function that issues a deprecation
        warning, then calls the original.

        @param reactor: The Twisted reactor.
        RtiterateRN(RRtsetattrR(RRR	((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_deprecateReactorQs	cCs=x-|jjD]\}}t|||qWi|_dS(s
        Restore the deprecated reactor methods. Undoes what
        L{_deprecateReactor} did.

        @param reactor: The Twisted reactor.
        N(Rt	iteritemsR
(RRR	R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_undeprecateReactor^scCst|_|jjdS(N(t_logObserverRR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_installObserveris	cCs|jjdS(N(RR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRmscGs|jj|S(s
        Remove stored errors received from the log.

        C{TestCase} stores each error logged during the run of the test and
        reports them as errors during the cleanup phase (after C{tearDown}).

        @param *errorTypes: If unspecifed, flush all errors. Otherwise, only
        flush errors that match the given types.

        @return: A list of failures that have been removed.
        (RR(RR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRpscCsu|d	kr#|j}g|j(ng}x|jD]}x|D]}t|tjtjfswtd|fntj|j	}t
j|}|tj
j|jkrq@ntt|j}|dd}|dd}	||jko|	kns
q@n|j|Pq@Wq3Wt|jj|g|D]4}
i|
jd6|
jd6|
jd6|
jd6^q=S(
sv
        Remove stored warnings from the list of captured warnings and return
        them.

        @param offendingFunctions: If C{None}, all warnings issued during the
            currently running test will be flushed.  Otherwise, only warnings
            which I{point} to a function included in this list will be flushed.
            All warnings include a filename and source line number; if these
            parts of a warning point to a source line which is part of a
            function, then the warning I{points} to that function.
        @type offendingFunctions: L{NoneType} or L{list} of functions or methods.

        @raise ValueError: If C{offendingFunctions} is not C{None} and includes
            an object which is not a L{FunctionType} or L{MethodType} instance.

        @return: A C{list}, each element of which is a C{dict} giving
            information about one warning which was flushed by this call.  The
            keys of each C{dict} are:

                - C{'message'}: The string which was passed as the I{message}
                  parameter to L{warnings.warn}.

                - C{'category'}: The warning subclass which was passed as the
                  I{category} parameter to L{warnings.warn}.

                - C{'filename'}: The name of the file containing the definition
                  of the code object which was C{stacklevel} frames above the
                  call to L{warnings.warn}, where C{stacklevel} is the value of
                  the C{stacklevel} parameter passed to L{warnings.warn}.

                - C{'lineno'}: The source line associated with the active
                  instruction of the code object object which was C{stacklevel}
                  frames above the call to L{warnings.warn}, where
                  C{stacklevel} is the value of the C{stacklevel} parameter
                  passed to L{warnings.warn}.
        s%r is not a function or methodiiiR'R(R)R*N(Rt	_warningsRttypestFunctionTypet
MethodTypet
ValueErrorR8R-Rtinspectt
getabsfiletostpathtnormcaseR)R"t_findlinestartst	func_codeR*RotmaptremoveR'R((RtoffendingFunctionsttoFlushtaWarningt	aFunctiontaModuleR)t
lineStartsRRtlasttw((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
flushWarningss0%



	cOs|jj|||fdS(s
        Add the given function to a list of functions to be called after the
        test has run, but before C{tearDown}.

        Functions will be run in reverse order of being added. This helps
        ensure that tear down complements set up.

        The function C{f} may return a Deferred. If so, C{TestCase} will wait
        until the Deferred has fired before proceeding to the next function.
        N(RRo(RR=R2R>((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
addCleanupscOs|||}|j|jg}yt|}Wntk
rS|}d}	n
X|\}}	t|dkr|jd|fn|dd}
t||d|	}|j||
|S(s[
        Call a function that should have been deprecated at a specific version
        and in favor of a specific alternative, and assert that it was thusly
        deprecated.

        @param version: A 2-sequence of (since, replacement), where C{since} is
            a the first L{version<twisted.python.versions.Version>} that C{f}
            should have been deprecated since, and C{replacement} is a suggested
            replacement for the deprecated functionality, as described by
            L{twisted.python.deprecate.deprecated}.  If there is no suggested
            replacement, this parameter may also be simply a
            L{version<twisted.python.versions.Version>} by itself.

        @param f: The deprecated function to call.

        @param args: The arguments to pass to C{f}.

        @param kwargs: The keyword arguments to pass to C{f}.

        @return: Whatever C{f} returns.

        @raise: Whatever C{f} raises.  If any exception is
            raised by C{f}, though, no assertions will be made about emitted
            deprecations.

        @raise FailTest: if no warnings were emitted by C{f}, or if the
            L{DeprecationWarning} emitted did not produce the canonical
            please-use-something-else message that is standard for Twisted
            deprecations according to the given version and replacement.
        is%r is not deprecated.R'treplacementN(	R)tcallDeprecatedR"R#RRQRFRRT(RtversionR=R2R>RARrtinfotsinceR+tobservedWarningtexpectedWarning((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR,s

cCsid}g}xJt|jdkr[|jj\}}}|j||||qWtj|S(s
        Run the cleanups added with L{addCleanup} in order.

        @return: A C{Deferred} that fires when all cleanups are run.
        csfdS(Ncs
S(N(((R>R2R=(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs((R=R2R>((R>R2R=s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
_makeFunctionsi(RQRtpopRoRt_runSequentially(RR2t	callablesR=R2R>((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs	cCs6tj|||f}|j|j|j|S(s

        Monkey patch an object for the duration of the test.

        The monkey patch will be reverted at the end of the test using the
        L{addCleanup} mechanism.

        The L{MonkeyPatcher} is returned so that users can restore and
        re-apply the monkey patch within their tests.

        @param obj: The object to monkey patch.
        @param attribute: The name of the attribute to change.
        @param value: The value to set the attribute to.
        @return: A L{monkey.MonkeyPatcher} object.
        (Rt
MonkeyPatchertpatchR*trestore(Rtobjt	attributeR$tmonkeyPatch((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR7!s
cCsdS(s
        If no C{methodName} argument is passed to the constructor, L{run} will
        treat this method as the thing with the actual test inside.
        N((R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR6scs7tjdjddlmtjd}|dkrTtn|t	_
jjrj
jjdSjfd}g_tjj|xEjD]7}ytj|WqjtjqXqWjdS(sQ
        Run the test case, storing the results in C{result}.

        First runs C{setUp} on self, then runs the test method (defined in the
        constructor), then runs C{tearDown}. Any of these may return
        L{Deferred}s. After they complete, does some reactor cleanup.

        @param result: A L{TestResult} object.
        s
--> %s <--i(RNcspt_jzEjd}zj|WdjjXWdjXdS(N(	RRRRRt_waitRRR(R(RRRA(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytrunThunkXs	

(RREtidRRR	t	IReporterRtPyUnitResultAdapterRRt	startTesttgetSkipRtstopTestRRRBRoR)R9t
warn_explicitRRRK(RRAt
new_resultR=R(((RRRAs:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR=s,
	



	cCsHt|jjdkr+|jjd}ntjddd|}|S(NisSDo not raise unittest.SkipTest with no arguments! Give a reason for skipping tests!Ri(RQR$R2R9R(RR=R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRsscCstj|jddS(sU
        Return the skip reason set on this test, if any is set. Checks on the
        instance first, then the class, then the module, then packages. As
        soon as it finds something with a C{skip} attribute, returns that.
        Returns C{None} if it cannot find anything. See L{TestCase} docstring
        for more details.
        tskipN(RtacquireAttributeRR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRB}scCs2tj|jdd}|dkr(dSt|S(sQ
        Return a L{Todo} object if the test is marked todo. Checks on the
        instance first, then the class, then the module, then packages. As
        soon as it finds something with a C{todo} attribute, returns that.
        Returns C{None} if it cannot find anything. See L{TestCase} docstring
        for more details.
        RN(RRGRRR%(RR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCs^tj|jdtj}yt|SWn.ttfk
rYtjddt	tjSXdS(se
        Returns the timeout value set on this test. Checks on the instance
        first, then the class, then the module, then packages. As soon as it
        finds something with a C{timeout} attribute, returns that. Returns
        L{util.DEFAULT_TIMEOUT_DURATION} if it cannot find anything. See
        L{TestCase} docstring for more details.
        Rs)'timeout' attribute needs to be a number.R(N(
RRGRtDEFAULT_TIMEOUT_DURATIONtfloatRR#R9RR(RR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCstj|jdgS(sx
        Returns any warning suppressions set for this test. Checks on the
        instance first, then the class, then the module, then packages. As
        soon as it finds something with a C{suppress} attribute, returns that.
        Returns any empty list (i.e. suppress no warnings) if it cannot find
        anything. See L{TestCase} docstring for more details.
        R(RRGR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCs!tjddt||dS(s
        Visit this test case. Call C{visitor} with C{self} as a parameter.

        Deprecated in Twisted 8.0.

        @param visitor: A callable which expects a single parameter: a test
        case.

        @return: None
        s'Test visitors deprecated in Twisted 8.0R(N(R9RR(Rtvisitor((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytvisitscCsd}tjj|jj| |jj| |j| }tjj|s[tj|nt	j
dd|}tjj|dS(sReturns a unique name that may be used as either a temporary
        directory or filename.

        @note: you must call os.mkdir on the value returned from this
               method if you wish to use it as a directory!
        i RPttemp(RRtjoint	__class__RRRtexiststmakedirsttempfiletmkdtemp(RtMAX_FILENAMEtbasetdirname((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytmktemps
cs-ddlm|r%tdngfd}fd}tj|tjdddt}fd	}tj|tjdddt}|jd
ze|j
|rd
S|j
||_zjWd
`Xs|j
rd
StWd
d
|jXd
S(sJTake a Deferred that only ever callbacks. Block until it happens.
        i(Rs_wait is not reentrantcs dk	rj|ndS(N(RRo(tany(tresults(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRoscsdk	rjndS(N(RR(tign(RXR(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRsR'sreactor\.crash cannot be used.*R(csjdS(N(R((R(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRsN(RRtRuntimeErrorRRRRRRoRRRRRRR3(RRtrunningRoRR((RXRs:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR<s8


	
(iiN(2RRRR
R	t	ITestCaseRRDRR8tversion_infoRRRRRRRRRRRRRRRRRRRRRRRR)R*R,RR7RRRRBRRRRKRVt_wait_is_runningR<(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRgsT+
		 																		
				Q		4				6	
	
	
				tUnsupportedTrialFeaturecBseZdZRS(s?A feature of twisted.trial was used that pyunit cannot support.(RRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR_sR@cBszeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZRS(
s
    Wrap a C{TestResult} from the standard library's C{unittest} so that it
    supports the extended result types from Trial, and also supports
    L{twisted.python.failure.Failure}s being passed to L{addError} and
    L{addFailure}.
    cCs
||_dS(sM
        @param original: A C{TestResult} instance from C{unittest}.
        N(toriginal(RR`((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR scCs
tj|S(N(RtexcInfoOrFailureToExcInfo(Rterr((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt	_exc_info&scCs|jj|dS(N(R`RA(RR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRA)scCs|jj|dS(N(R`RC(RR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRC,scCs |jj||j|dS(N(R`RRc(RttestRF((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR/scCs |jj||j|dS(N(R`RRc(RRdR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR2scCs)|jj|tt||dfdS(N(R`RR_R(RRdtfeatureR.((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_unsupported5s
	cCs|j|d|dS(s/
        Report the skip as a failure.
        RFN(Rf(RRdR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR<scCs|j|d|dS(s=
        Report the unexpected success as a failure.
        sunexpected successN(Rf(RRdR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRBscCs|j|d|dS(sG
        Report the expected failure (i.e. todo) as a failure.
        sexpected failureN(Rf(RRdR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRHscCs|jj|dS(N(R`R(RRd((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRNscCsdS(N((RRRRtprintStatus((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pytupDownErrorQs(RRRRRcRARCRRRfRRRRRh(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR@s											cCstjddtx|jD]}t|dd}|dk	rN||qt|tjrt	j
|}|j|qt|tjrt
||q|j|qWdS(s
    Visit each test in C{suite} with C{visitor}.

    Deprecated in Twisted 8.0.

    @param visitor: A callable which takes a single argument, the L{TestCase}
    instance to visit.
    @return: None
    s'Test visitors deprecated in Twisted 8.0R(RKN(R9RRt_testsRRRtpyunitRR	R\RKt	TestSuitet
suiteVisit(tsuiteRJtcaseRK((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRlVs

RkcBs&eZdZeZdZdZRS(s
    Extend the standard library's C{TestSuite} with support for the visitor
    pattern and a consistently overrideable C{run} method.
    cCs
|j|S(N(R(RRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRxscCs/x(|jD]}|jrPn||q
W|S(s;
        Call C{run} on every member of the suite.
        (Rit
shouldStop(RRARd((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR|s
	(RRRRlRKRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRkps	t
TestDecoratort
_originalTestcBs-eZdZeejdZdZRS(s
    Decorator for test cases.

    @param _originalTest: The wrapped instance of test.
    @type _originalTest: A provider of L{itrial.ITestCase}
    cCs
|j|S(sQ
        Run the unit test.

        @param result: A TestResult object.
        (R(RRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRscCs|jjtj||jS(sQ
        Run the unit test.

        @param result: A TestResult object.
        (RqRR
t_AdaptedReporterRN(RRA((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs	(RRRR
R	R\RR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRps
		cCs
g|_dS(s
    Clear all tests from C{suite}.

    This messes with the internals of C{suite}. In particular, it assumes that
    the suite keeps all of its tests in a list in an instance variable called
    C{_tests}.
    N(Ri(Rm((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt_clearSuitescCs`yt|}Wntk
r*||SXt|x$|D]}|jt||q<W|S(s2
    Decorate all test cases in C{test} with C{decorator}.

    C{test} can be a test case or a test suite. If it is a test suite, then the
    structure of the suite is preserved.

    L{decorate} tries to preserve the class of the test suites it finds, but
    assumes the presence of the C{_tests} attribute on the suite.

    @param test: The C{TestCase} or C{TestSuite} to decorate.

    @param decorator: A unary callable used to decorate C{TestCase}s.

    @return: A decorated C{TestCase} or a C{TestSuite} containing decorated
        C{TestCase}s.
    (titerR#RstaddTesttdecorate(Rdt	decoratorttestsRn((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRvs


t_PyUnitTestCaseAdaptercBseZdZdZRS(s2
    Adapt from pyunit.TestCase to ITestCase.
    cCs!tjddt||dS(s,
        Deprecated in Twisted 8.0.
        s'Test visitors deprecated in Twisted 8.0R(N(R9RR(RRJ((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRKs(RRRRK(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRyst_BrokenIDTestCaseAdaptercBseZdZdZRS(s
    Adapter for pyunit-style C{TestCase} subclasses that have undesirable id()
    methods. That is L{pyunit.FunctionTestCase} and L{pyunit.DocTestCase}.
    cCs,|jj}|dk	r|S|jjS(sH
        Return the fully-qualified Python name of the doctest.
        N(RqRRR>(RttestID((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR>s(RRRR>(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRzst _ForceGarbageCollectionDecoratorcBseZdZdZRS(s
    Forces garbage collection to be run before and after the test. Any errors
    logged during the post-test collection are added to the test result as
    errors.
    cCsmtjtj||tjtjx$tjD]}|j||q;Wtjtj	dS(N(
tgctcollectRpRRRRRRR(RRAR((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs



(RRRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR|stDocTestCaseccsZyt|}Wntk
r(|Vn.Xx*|D]"}xt|D]}|VqCWq0WdS(sF
    Iterate through all of the test cases in C{testSuiteOrCase}.
    N(RtR#t
_iterateTests(ttestSuiteOrCaseRmRdtsubtest((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyRs
	
cCs
t|jS(N(RtRi(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt__iter__*st_SubTestCasecBseZdZRS(cCstj|ddS(NR(RR(R((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR1s(RRR(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR0scsfd}|S(sR
    Internal method used to deprecate top-level assertions. Do not use this.
    cs9tjdfdddttt||S(NsJunittest.%s is deprecated.  Instead use the %r method on unittest.TestCaseRiR((R9RRRt_inst(R2R>(R	(s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyR
:s	

((R	R
((R	s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt
_deprecate6sRFRRWRRIRURZRVR[RHR_R^RORRRmRnRRRRRTRRRRR}RpRRRRjRR(KRtdoctestRRR9R8RQR}RtpprintRtdisRRRRRttwisted.pythonRRRRttwisted.python.deprecateRt
twisted.trialR	R
Rt
__import__Rjtzope.interfaceR
t	ExceptionRR1RtobjectRR%R&R/RBRRCRRR^R_R@RlRktproxyForInterfaceR\RpRsRvRyRzR|tregisterAdaptertFunctionTestCaseRRt_docTestCaseRRtR#RRRRt_assertionsRtglobalst__all__(((s:/usr/lib/python2.7/dist-packages/twisted/trial/unittest.pyt<module>	sH"&			!K_	>