Your IP : 172.28.240.42


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


Mc@sddlZddlZddlmZdZejddZdZdZdej	fd	YZ
d
e
fdYZdS(iN(tunittestsk
from twisted.trial import unittest

class FooTest(unittest.TestCase):
    def testFoo(self):
        pass
s
s
s
'''This module is used by test_loader to test the Trial test loading
functionality. Do NOT change the number of tests in this module.
Do NOT change the names the tests in this module.
'''

import unittest as pyunit
from twisted.trial import unittest

class FooTest(unittest.TestCase):
    def test_foo(self):
        pass

    def test_bar(self):
        pass


class PyunitTest(pyunit.TestCase):
    def test_foo(self):
        pass

    def test_bar(self):
        pass


class NotATest(object):
    def test_foo(self):
        pass


class AlphabetTest(unittest.TestCase):
    def test_a(self):
        pass

    def test_b(self):
        pass

    def test_c(self):
        pass
sp
'''This module is used by test_loader to test the Trial test loading
functionality. Do NOT change the number of tests in this module.
Do NOT change the names the tests in this module.
'''

from twisted.trial import unittest

class X(object):
    
    def test_foo(self):
        pass

class A(unittest.TestCase, X):
    pass

class B(unittest.TestCase, X):
    pass

tPackageTestcBseZdddd d!d"d#defd$defd%defd&defd'defgZdZdZdZ	ddZ
dZd(dZ
dZRS()sbadpackage/__init__.pysfrotz
sbadpackage/test_module.pytspackage2/__init__.pyspackage2/test_module.pys
import frotz
spackage/__init__.pyspackage/frotz.pyspackage/test_bad_module.pys%raise ZeroDivisionError("fake error")spackage/test_dos_module.pyspackage/test_import_module.pysimport frotzspackage/test_module.pysgoodpackage/__init__.pysgoodpackage/test_sample.pysgoodpackage/sub/__init__.pysgoodpackage/sub/test_sample.pysinheritancepackage/__init__.pysinheritancepackage/test_x.pycCsOtjj|d}|jd}|ddkrB|d }ndj|S(Nit/it__init__t.(tostpathtsplitexttsplittjoin(tselftfilenametnametsegs((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyt
_toModuleNamebs

cCst|jt|jdS(Ni(tmapRtziptfiles(R((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyt
getModulesiscCsW|j}|j|jx0|D](}ytj|=Wq'tk
rNq'Xq'WdS(N(RtsorttreversetsystmodulestKeyError(RRtmodule((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pytcleanUpModulesls



RcCsfx_|jD]T\}}tjj||}|j|t|d}|j||jq
WdS(Ntw(RRRR
t_createDirectorytopentwritetclose(RRt	parentDirRtcontentstfd((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pytcreateFilesvs

cCs8tjj|}tjj|s4tj|ndS(N(RRtdirnametexiststmakedirs(RRt	directory((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyR~scCs;|dkr|j}n||_|j|j|dS(N(tNonetmktemptparentR#R(RR ((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pytsetUps	cCs|jdS(N(R(R((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyttearDowns(sbadpackage/__init__.pysfrotz
(sbadpackage/test_module.pyR(spackage2/__init__.pyR(spackage2/test_module.pys
import frotz
(spackage/__init__.pyR(spackage/frotz.pysfrotz
(spackage/test_bad_module.pys%raise ZeroDivisionError("fake error")(spackage/test_import_module.pysimport frotz(sgoodpackage/__init__.pyR(sgoodpackage/sub/__init__.pyR(sinheritancepackage/__init__.pyRN(t__name__t
__module__t	dosModulet
testModulet
testSamplettestInheritanceSampleRRRRR#RR(R+R,(((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyRMs0							
	tSysPathManglingTestcBs&eZddZdZdZRS(cCsltj|_tj|_|dkr5|j}ntj|||jj|j	|j
|jdS(N(RRtoldPathtnewPathR(R)RR+tappendR*t
mangleSysPath(RR*((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyR+s

cCs!tj||j|jdS(N(RR,R7R4(R((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyR,s
cCs|tj(dS(N(RR(RtpathVar((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyR7sN(R-R.R(R+R,R7(((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyR3s		(RRt
twisted.trialRR0treplaceR/R1R2tTestCaseRR3(((s?/usr/lib/python2.7/dist-packages/twisted/trial/test/packages.pyt<module>s*?