Ticket #7872: misc_7872.patch

File misc_7872.patch, 100.6 KB (added by Eeshan Garg, 7 years ago)
  • twisted/internet/gtkreactor.py

    diff --git twisted/internet/gtkreactor.py twisted/internet/gtkreactor.py
    index 60e17b4..aa82ad9 100644
    class GtkReactor(posixbase.PosixReactorBase): 
    106106        # flush some pending events, return if there was something to do
    107107        # don't use the usual "while gtk.events_pending(): mainiteration()"
    108108        # idiom because lots of IO (in particular test_tcp's
    109         # ProperlyCloseFilesTestCase) can keep us from ever exiting.
     109        # ProperlyCloseFilesTests) can keep us from ever exiting.
    110110        log.msg(channel='system', event='iteration', reactor=self)
    111111        if gtk.events_pending():
    112112            gtk.mainiteration(0)
  • twisted/python/test/test_zippath.py

    diff --git twisted/python/test/test_zippath.py twisted/python/test/test_zippath.py
    index 75e8c5e..a9e23c3 100644
    Test cases covering L{twisted.python.zippath}. 
    77
    88import os, zipfile
    99
    10 from twisted.test.test_paths import AbstractFilePathTestCase
     10from twisted.test.test_paths import AbstractFilePathTests
    1111from twisted.python.zippath import ZipArchive
    1212
    1313
    def zipit(dirname, zfname): 
    2626
    2727
    2828
    29 class ZipFilePathTests(AbstractFilePathTestCase):
     29class ZipFilePathTests(AbstractFilePathTests):
    3030    """
    3131    Test various L{ZipPath} path manipulations as well as reprs for L{ZipPath}
    3232    and L{ZipArchive}.
    3333    """
    3434    def setUp(self):
    35         AbstractFilePathTestCase.setUp(self)
     35        AbstractFilePathTests.setUp(self)
    3636        zipit(self.cmn, self.cmn + '.zip')
    3737        self.path = ZipArchive(self.cmn + '.zip')
    3838        self.root = self.path
  • twisted/test/iosim.py

    diff --git twisted/test/iosim.py twisted/test/iosim.py
    index d863d66..1fcfd48 100644
     
    1 # -*- test-case-name: twisted.test.test_amp.TLSTest,twisted.test.test_iosim -*-
     1# -*- test-case-name: twisted.test.test_amp.TLSTests,twisted.test.test_iosim -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
  • twisted/test/stdio_test_consumer.py

    diff --git twisted/test/stdio_test_consumer.py twisted/test/stdio_test_consumer.py
    index c0af9d4..6d7d4cb 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_consumer -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_consumer -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_consumer} to test
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_consumer} to test
    88that process transports implement IConsumer properly.
    99"""
    1010
  • twisted/test/stdio_test_halfclose.py

    diff --git twisted/test/stdio_test_halfclose.py twisted/test/stdio_test_halfclose.py
    index f7aa161..13f89d7 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_readConnectionLost -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_readConnectionLost -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_readConnectionLost}
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_readConnectionLost}
    88to test that IHalfCloseableProtocol.readConnectionLost works for process
    99transports.
    1010"""
  • twisted/test/stdio_test_hostpeer.py

    diff --git twisted/test/stdio_test_hostpeer.py twisted/test/stdio_test_hostpeer.py
    index 69aa873..707e05b 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_hostAndPeer -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_hostAndPeer -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_hostAndPeer} to test
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_hostAndPeer} to test
    88that ITransport.getHost() and ITransport.getPeer() work for process transports.
    99"""
    1010
  • twisted/test/stdio_test_lastwrite.py

    diff --git twisted/test/stdio_test_lastwrite.py twisted/test/stdio_test_lastwrite.py
    index ff72495..1449cac 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_lastWriteReceived -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_lastWriteReceived -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_lastWriteReceived}
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_lastWriteReceived}
    88to test that L{os.write} can be reliably used after
    99L{twisted.internet.stdio.StandardIO} has finished.
    1010"""
  • twisted/test/stdio_test_loseconn.py

    diff --git twisted/test/stdio_test_loseconn.py twisted/test/stdio_test_loseconn.py
    index 2a51e3e..c9fa2d0 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_loseConnection -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection} to
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_loseConnection} to
    88test that ITransport.loseConnection() works for process transports.
    99"""
    1010
  • twisted/test/stdio_test_producer.py

    diff --git twisted/test/stdio_test_producer.py twisted/test/stdio_test_producer.py
    index 7ca72e7..6160772 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_producer -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_producer -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_producer} to test
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_producer} to test
    88that process transports implement IProducer properly.
    99"""
    1010
  • twisted/test/stdio_test_write.py

    diff --git twisted/test/stdio_test_write.py twisted/test/stdio_test_write.py
    index 2b33109..b502452 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_write -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_write -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_write} to test that
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_write} to test that
    88ITransport.write() works for process transports.
    99"""
    1010
  • twisted/test/stdio_test_writeseq.py

    diff --git twisted/test/stdio_test_writeseq.py twisted/test/stdio_test_writeseq.py
    index 85c9f9d..6a92e9b 100644
     
    1 # -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_writeSequence -*-
     1# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_writeSequence -*-
    22# Copyright (c) Twisted Matrix Laboratories.
    33# See LICENSE for details.
    44
    55"""
    66Main program for the child process run by
    7 L{twisted.test.test_stdio.StandardInputOutputTestCase.test_writeSequence} to test that
     7L{twisted.test.test_stdio.StandardInputOutputTests.test_writeSequence} to test that
    88ITransport.writeSequence() works for process transports.
    99"""
    1010
  • twisted/test/test_adbapi.py

    diff --git twisted/test/test_adbapi.py twisted/test/test_adbapi.py
    index bc9a84d..843fa8e 100644
    def makeSQLTests(base, suffix, globals): 
    561561                                base.__dict__)
    562562        globals[name] = klass
    563563
    564 # GadflyADBAPITestCase SQLiteADBAPITestCase PyPgSQLADBAPITestCase
    565 # PsycopgADBAPITestCase MySQLADBAPITestCase FirebirdADBAPITestCase
    566 makeSQLTests(ADBAPITestBase, 'ADBAPITestCase', globals())
     564# GadflyADBAPITests SQLiteADBAPITests PyPgSQLADBAPITests
     565# PsycopgADBAPITests MySQLADBAPITests FirebirdADBAPITests
     566makeSQLTests(ADBAPITestBase, 'ADBAPITests', globals())
    567567
    568 # GadflyReconnectTestCase SQLiteReconnectTestCase PyPgSQLReconnectTestCase
    569 # PsycopgReconnectTestCase MySQLReconnectTestCase FirebirdReconnectTestCase
    570 makeSQLTests(ReconnectTestBase, 'ReconnectTestCase', globals())
     568# GadflyReconnectTests SQLiteReconnectTests PyPgSQLReconnectTests
     569# PsycopgReconnectTests MySQLReconnectTests FirebirdReconnectTests
     570makeSQLTests(ReconnectTestBase, 'ReconnectTests', globals())
    571571
    572572
    573573
    class FakePool(object): 
    600600
    601601
    602602
    603 class ConnectionTestCase(unittest.TestCase):
     603class ConnectionTests(unittest.TestCase):
    604604    """
    605605    Tests for the L{Connection} class.
    606606    """
    class ConnectionTestCase(unittest.TestCase): 
    623623
    624624
    625625
    626 class TransactionTestCase(unittest.TestCase):
     626class TransactionTests(unittest.TestCase):
    627627    """
    628628    Tests for the L{Transaction} class.
    629629    """
    class EventReactor(object): 
    712712
    713713
    714714
    715 class ConnectionPoolTestCase(unittest.TestCase):
     715class ConnectionPoolTests(unittest.TestCase):
    716716    """
    717717    Unit tests for L{ConnectionPool}.
    718718    """
  • twisted/test/test_amp.py

    diff --git twisted/test/test_amp.py twisted/test/test_amp.py
    index 00266f7..05a2093 100644
    class AmpBoxTests(unittest.TestCase): 
    407407
    408408
    409409
    410 class ParsingTest(unittest.TestCase):
     410class ParsingTests(unittest.TestCase):
    411411
    412412    def test_booleanValues(self):
    413413        """
    class CommandDispatchTests(unittest.TestCase): 
    547547    and responses using Command.responder decorator.
    548548
    549549    Note: Originally, AMP's factoring was such that many tests for this
    550     functionality are now implemented as full round-trip tests in L{AMPTest}.
     550    functionality are now implemented as full round-trip tests in L{AMPTests}.
    551551    Future tests should be written at this level instead, to ensure API
    552552    compatibility and to provide more granular, readable units of test
    553553    coverage.
    class BinaryProtocolTests(unittest.TestCase): 
    11981198
    11991199
    12001200
    1201 class AMPTest(unittest.TestCase):
     1201class AMPTests(unittest.TestCase):
    12021202
    12031203    def test_interfaceDeclarations(self):
    12041204        """
    class SecurableProto(FactoryNotifier): 
    18981898
    18991899
    19001900
    1901 class TLSTest(unittest.TestCase):
     1901class TLSTests(unittest.TestCase):
    19021902    def test_startingTLS(self):
    19031903        """
    19041904        Verify that starting TLS and succeeding at handshaking sends all the
    class TLSTest(unittest.TestCase): 
    20052005
    20062006
    20072007
    2008 class TLSNotAvailableTest(unittest.TestCase):
     2008class TLSNotAvailableTests(unittest.TestCase):
    20092009    """
    20102010    Tests what happened when ssl is not available in current installation.
    20112011    """
    if ssl is not None: 
    22712271    tempcert = tempSelfSigned()
    22722272
    22732273
    2274 class LiveFireTLSTestCase(LiveFireBase, unittest.TestCase):
     2274class LiveFireTLSTests(LiveFireBase, unittest.TestCase):
    22752275    clientProto = SecurableProto
    22762276    serverProto = SecurableProto
    22772277    def test_liveFireCustomTLS(self):
    class SlightlySmartTLS(SimpleSymmetricCommandProtocol): 
    23232323    amp.StartTLS.responder(getTLSVars)
    23242324
    23252325
    2326 class PlainVanillaLiveFire(LiveFireBase, unittest.TestCase):
     2326class PlainVanillaLiveFireTests(LiveFireBase, unittest.TestCase):
    23272327
    23282328    clientProto = SimpleSymmetricCommandProtocol
    23292329    serverProto = SimpleSymmetricCommandProtocol
    class PlainVanillaLiveFire(LiveFireBase, unittest.TestCase): 
    23412341
    23422342
    23432343
    2344 class WithServerTLSVerification(LiveFireBase, unittest.TestCase):
     2344class WithServerTLSVerificationTests(LiveFireBase, unittest.TestCase):
    23452345    clientProto = SimpleSymmetricCommandProtocol
    23462346    serverProto = SlightlySmartTLS
    23472347
    class ProtocolIncludingCommandWithDifferentCommandType( 
    24802480
    24812481
    24822482
    2483 class CommandTestCase(unittest.TestCase):
     2483class CommandTests(unittest.TestCase):
    24842484    """
    24852485    Tests for L{amp.Argument} and L{amp.Command}.
    24862486    """
    class UTCTests(unittest.TestCase): 
    31643164
    31653165if not interfaces.IReactorSSL.providedBy(reactor):
    31663166    skipMsg = 'This test case requires SSL support in the reactor'
    3167     TLSTest.skip = skipMsg
    3168     LiveFireTLSTestCase.skip = skipMsg
    3169     PlainVanillaLiveFire.skip = skipMsg
    3170     WithServerTLSVerification.skip = skipMsg
     3167    TLSTests.skip = skipMsg
     3168    LiveFireTLSTests.skip = skipMsg
     3169    PlainVanillaLiveFireTests.skip = skipMsg
     3170    WithServerTLSVerificationTests.skip = skipMsg
  • twisted/test/test_application.py

    diff --git twisted/test/test_application.py twisted/test/test_application.py
    index acb684c..6f6bf36 100644
    from twisted.python.test.modules_helpers import TwistedModulesMixin 
    2424class Dummy:
    2525    processName=None
    2626
    27 class TestService(unittest.TestCase):
     27class ServiceTests(unittest.TestCase):
    2828
    2929    def testName(self):
    3030        s = service.Service()
    else: 
    151151    curuid = curgid = 0
    152152
    153153
    154 class TestProcess(unittest.TestCase):
     154class ProcessTests(unittest.TestCase):
    155155
    156156    def testID(self):
    157157        p = service.Process(5, 6)
    class TestProcess(unittest.TestCase): 
    176176        self.assertEqual(p.processName, 'hello')
    177177
    178178
    179 class TestInterfaces(unittest.TestCase):
     179class InterfacesTests(unittest.TestCase):
    180180
    181181    def testService(self):
    182182        self.assert_(service.IService.providedBy(service.Service()))
    class TestInterfaces(unittest.TestCase): 
    189189        self.assert_(service.IProcess.providedBy(service.Process()))
    190190
    191191
    192 class TestApplication(unittest.TestCase):
     192class ApplicationTests(unittest.TestCase):
    193193
    194194    def testConstructor(self):
    195195        service.Application("hello")
    class TestApplication(unittest.TestCase): 
    220220        self.assertEqual(p.name, 'hello')
    221221        self.assert_(p.original is a)
    222222
    223 class TestLoading(unittest.TestCase):
     223class LoadingTests(unittest.TestCase):
    224224
    225225    def test_simpleStoreAndLoad(self):
    226226        a = service.Application("hello")
    class TestLoading(unittest.TestCase): 
    241241
    242242
    243243
    244 class TestAppSupport(unittest.TestCase):
     244class AppSupportTests(unittest.TestCase):
    245245
    246246    def testPassphrase(self):
    247247        self.assertEqual(app.getPassphrase(0), None)
    class TestEcho(wire.Echo): 
    316316    def connectionLost(self, reason):
    317317        self.d.callback(True)
    318318
    319 class TestInternet2(unittest.TestCase):
     319class InternetTests(unittest.TestCase):
    320320
    321321    def testTCP(self):
    322322        s = service.MultiService()
    class TestInternet2(unittest.TestCase): 
    592592
    593593
    594594
    595 class TestTimerBasic(unittest.TestCase):
     595class TimerBasicTests(unittest.TestCase):
    596596
    597597    def testTimerRuns(self):
    598598        d = defer.Deferred()
    class FakeReactor(reactors.Reactor): 
    660660
    661661
    662662
    663 class PluggableReactorTestCase(TwistedModulesMixin, unittest.TestCase):
     663class PluggableReactorTests(TwistedModulesMixin, unittest.TestCase):
    664664    """
    665665    Tests for the reactor discovery/inspection APIs.
    666666    """
  • twisted/test/test_banana.py

    diff --git twisted/test/test_banana.py twisted/test/test_banana.py
    index 048dc29..2274bfc 100644
    from twisted.internet import protocol, main 
    1313from twisted.test.proto_helpers import StringTransport
    1414
    1515
    16 class MathTestCase(unittest.TestCase):
     16class MathTests(unittest.TestCase):
    1717    def test_int2b128(self):
    1818        funkylist = range(0,100) + range(1000,1100) + range(1000000,1000100) + [1024 **10l]
    1919        for i in funkylist:
    class BananaTestBase(unittest.TestCase): 
    9696
    9797
    9898
    99 class BananaTestCase(BananaTestBase):
     99class BananaTests(BananaTestBase):
    100100    """
    101101    General banana tests.
    102102    """
    class BananaTestCase(BananaTestBase): 
    131131        defined with the ``class`` statement).  ``Banana.sendEncoded`` raises
    132132        ``BananaError`` if called with an instance of such a type.
    133133        """
    134         self._unsupportedTypeTest(MathTestCase(), __name__ + ".MathTestCase")
     134        self._unsupportedTypeTest(MathTests(), __name__ + ".MathTests")
    135135
    136136
    137137    def _unsupportedTypeTest(self, obj, name):
  • twisted/test/test_compat.py

    diff --git twisted/test/test_compat.py twisted/test/test_compat.py
    index 5075339..02135fa 100644
    class IOTypeTests(unittest.SynchronousTestCase): 
    125125
    126126
    127127
    128 class CompatTestCase(unittest.SynchronousTestCase):
     128class CompatTests(unittest.SynchronousTestCase):
    129129    """
    130130    Various utility functions in C{twisted.python.compat} provide same
    131131    functionality as modern Python variants.
    if _PY3: 
    241241
    242242
    243243
    244 class ExecfileCompatTestCase(unittest.SynchronousTestCase):
     244class ExecfileCompatTests(unittest.SynchronousTestCase):
    245245    """
    246246    Tests for the Python 3-friendly L{execfile} implementation.
    247247    """
  • twisted/test/test_context.py

    diff --git twisted/test/test_context.py twisted/test/test_context.py
    index e17fcf7..0b5bc65 100644
    from twisted.trial.unittest import SynchronousTestCase 
    1111
    1212from twisted.python import context
    1313
    14 class ContextTest(SynchronousTestCase):
     14class ContextTests(SynchronousTestCase):
    1515    """
    1616    Tests for the module-scope APIs for L{twisted.python.context}.
    1717    """
  • twisted/test/test_cooperator.py

    diff --git twisted/test/test_cooperator.py twisted/test/test_cooperator.py
    index b273b1d..f87c083 100644
    class FakeScheduler(object): 
    6464
    6565
    6666
    67 class TestCooperator(unittest.TestCase):
     67class CooperatorTests(unittest.TestCase):
    6868    RESULT = 'done'
    6969
    7070    def ebIter(self, err):
  • twisted/test/test_defer.py

    diff --git twisted/test/test_defer.py twisted/test/test_defer.py
    index 1ee3417..ab6d9fe 100644
    class UtilTests(unittest.TestCase): 
    116116
    117117
    118118
    119 class DeferredTestCase(unittest.SynchronousTestCase, ImmediateFailureMixin):
     119class DeferredTests(unittest.SynchronousTestCase, ImmediateFailureMixin):
    120120
    121121    def setUp(self):
    122122        self.callbackResults = None
    class FirstErrorTests(unittest.SynchronousTestCase): 
    14901490
    14911491
    14921492
    1493 class AlreadyCalledTestCase(unittest.SynchronousTestCase):
     1493class AlreadyCalledTests(unittest.SynchronousTestCase):
    14941494    def setUp(self):
    14951495        self._deferredWasDebugging = defer.getDebugging()
    14961496        defer.setDebugging(True)
    class AlreadyCalledTestCase(unittest.SynchronousTestCase): 
    16331633
    16341634
    16351635
    1636 class DeferredCancellerTest(unittest.SynchronousTestCase):
     1636class DeferredCancellerTests(unittest.SynchronousTestCase):
    16371637    def setUp(self):
    16381638        self.callbackResults = None
    16391639        self.errbackResults = None
    class DeferredCancellerTest(unittest.SynchronousTestCase): 
    18961896
    18971897
    18981898
    1899 class LogTestCase(unittest.SynchronousTestCase):
     1899class LogTests(unittest.SynchronousTestCase):
    19001900    """
    19011901    Test logging of unhandled errors.
    19021902    """
    class LogTestCase(unittest.SynchronousTestCase): 
    20562056
    20572057
    20582058
    2059 class DeferredTestCaseII(unittest.SynchronousTestCase):
     2059class DeferredListEmptyTests(unittest.SynchronousTestCase):
    20602060    def setUp(self):
    20612061        self.callbackRan = 0
    20622062
    class DeferredTestCaseII(unittest.SynchronousTestCase): 
    20742074
    20752075
    20762076
    2077 class OtherPrimitives(unittest.SynchronousTestCase, ImmediateFailureMixin):
     2077class OtherPrimitivesTests(unittest.SynchronousTestCase, ImmediateFailureMixin):
    20782078    def _incr(self, result):
    20792079        self.counter += 1
    20802080
    class OtherPrimitives(unittest.SynchronousTestCase, ImmediateFailureMixin): 
    23162316
    23172317
    23182318
    2319 class DeferredFilesystemLockTestCase(unittest.TestCase):
     2319class DeferredFilesystemLockTests(unittest.TestCase):
    23202320    """
    23212321    Test the behavior of L{DeferredFilesystemLock}
    23222322    """
  • twisted/test/test_defgen.py

    diff --git twisted/test/test_defgen.py twisted/test/test_defgen.py
    index 94e1541..71d9a0c 100644
    class InlineCallbacksTests(BaseDefgenTests, unittest.TestCase): 
    323323
    324324
    325325
    326 class DeprecateDeferredGenerator(unittest.SynchronousTestCase):
     326class DeprecateDeferredGeneratorTests(unittest.SynchronousTestCase):
    327327    """
    328328    Tests that L{DeferredGeneratorTests} and L{waitForDeferred} are
    329329    deprecated.
  • twisted/test/test_dict.py

    diff --git twisted/test/test_dict.py twisted/test/test_dict.py
    index 3ebb67e..bb87267 100644
    from twisted.protocols import dict 
    99paramString = "\"This is a dqstring \\w\\i\\t\\h boring stuff like: \\\"\" and t\\hes\\\"e are a\\to\\ms"
    1010goodparams = ["This is a dqstring with boring stuff like: \"", "and", "thes\"e", "are", "atoms"]
    1111
    12 class ParamTest(unittest.TestCase):
     12class ParamTests(unittest.TestCase):
    1313    def testParseParam(self):
    1414        """Testing command response handling"""
    1515        params = []
  • twisted/test/test_dirdbm.py

    diff --git twisted/test/test_dirdbm.py twisted/test/test_dirdbm.py
    index 8bd240f..f3d1f3f 100644
    from twisted.persisted import dirdbm 
    1212
    1313
    1414
    15 class DirDbmTestCase(unittest.TestCase):
     15class DirDbmTests(unittest.TestCase):
    1616
    1717    def setUp(self):
    1818        self.path = self.mktemp()
    class DirDbmTestCase(unittest.TestCase): 
    158158
    159159
    160160
    161 class ShelfTestCase(DirDbmTestCase):
     161class ShelfTests(DirDbmTests):
    162162
    163163    def setUp(self):
    164164        self.path = self.mktemp()
    class ShelfTestCase(DirDbmTestCase): 
    167167                      ('int', 12), ('float', 12.0), ('tuple', (None, 12)))
    168168
    169169
    170 testCases = [DirDbmTestCase, ShelfTestCase]
     170testCases = [DirDbmTests, ShelfTests]
  • twisted/test/test_doc.py

    diff --git twisted/test/test_doc.py twisted/test/test_doc.py
    index f63416c..14be5a8 100644
    def errorInFile(f, line=17, name=''): 
    2121    # return 'File "%s", line %d, in %s' % (f, line, name)
    2222
    2323
    24 class DocCoverage(unittest.TestCase):
     24class DocCoverageTests(unittest.TestCase):
    2525    """
    2626    Looking for docstrings in all modules and packages.
    2727    """
  • twisted/test/test_error.py

    diff --git twisted/test/test_error.py twisted/test/test_error.py
    index ad6b16b..9918d36 100644
    from twisted.internet import error 
    99from twisted.python.runtime import platformType
    1010
    1111
    12 class TestStringification(unittest.SynchronousTestCase):
     12class StringificationTests(unittest.SynchronousTestCase):
    1313    """Test that the exceptions have useful stringifications.
    1414    """
    1515
  • twisted/test/test_explorer.py

    diff --git twisted/test/test_explorer.py twisted/test/test_explorer.py
    index d4549f3..afa61db 100644
    class SomeDohickey: 
    3434        return self.args
    3535
    3636
    37 class TestBrowser(unittest.TestCase):
     37class BrowserTests(unittest.TestCase):
    3838    def setUp(self):
    3939        self.pool = explorer.explorerPool
    4040        self.pool.clear()
    def function_crazy((alpha, beta), c, d=range(4), **kw): 
    145145    "A function with a mad crazy signature."
    146146    return alpha, beta, c, d, kw
    147147
    148 class TestBrowseFunction(unittest.TestCase):
     148class BrowseFunctionTests(unittest.TestCase):
    149149
    150150    def setUp(self):
    151151        self.pool = explorer.explorerPool
  • twisted/test/test_factories.py

    diff --git twisted/test/test_factories.py twisted/test/test_factories.py
    index dffaf5a..9e0eb41 100644
    class FakeConnector(object): 
    2929
    3030
    3131
    32 class ReconnectingFactoryTestCase(TestCase):
     32class ReconnectingFactoryTests(TestCase):
    3333    """
    3434    Tests for L{ReconnectingClientFactory}.
    3535    """
  • twisted/test/test_failure.py

    diff --git twisted/test/test_failure.py twisted/test/test_failure.py
    index 1f30109..bfb42c5 100644
    def getDivisionFailure(*args, **kwargs): 
    4141    return f
    4242
    4343
    44 class FailureTestCase(SynchronousTestCase):
     44class FailureTests(SynchronousTestCase):
    4545    """
    4646    Tests for L{failure.Failure}.
    4747    """
    class FindFailureTests(SynchronousTestCase): 
    738738
    739739
    740740
    741 class TestFormattableTraceback(SynchronousTestCase):
     741class FormattableTracebackTests(SynchronousTestCase):
    742742    """
    743743    Whitebox tests that show that L{failure._Traceback} constructs objects that
    744744    can be used by L{traceback.extract_tb}.
    class TestFormattableTraceback(SynchronousTestCase): 
    776776
    777777
    778778
    779 class TestFrameAttributes(SynchronousTestCase):
     779class FrameAttributesTests(SynchronousTestCase):
    780780    """
    781781    _Frame objects should possess some basic attributes that qualify them as
    782782    fake python Frame objects.
    class TestFrameAttributes(SynchronousTestCase): 
    795795
    796796
    797797
    798 class TestDebugMode(SynchronousTestCase):
     798class DebugModeTests(SynchronousTestCase):
    799799    """
    800800    Failure's debug mode should allow jumping into the debugger.
    801801    """
  • twisted/test/test_fdesc.py

    diff --git twisted/test/test_fdesc.py twisted/test/test_fdesc.py
    index bb78421..272d50c 100644
    from twisted.trial import unittest 
    2020
    2121
    2222
    23 class NonBlockingTestCase(unittest.SynchronousTestCase):
     23class NonBlockingTests(unittest.SynchronousTestCase):
    2424    """
    2525    Tests for L{fdesc.setNonBlocking} and L{fdesc.setBlocking}.
    2626    """
    class NonBlockingTestCase(unittest.SynchronousTestCase): 
    5050
    5151
    5252
    53 class ReadWriteTestCase(unittest.SynchronousTestCase):
     53class ReadWriteTests(unittest.SynchronousTestCase):
    5454    """
    5555    Tests for L{fdesc.readFromFD}, L{fdesc.writeToFD}.
    5656    """
  • twisted/test/test_finger.py

    diff --git twisted/test/test_finger.py twisted/test/test_finger.py
    index c0c2e09..bcf9fcd 100644
    from twisted.protocols import finger 
    1010from twisted.test.proto_helpers import StringTransport
    1111
    1212
    13 class FingerTestCase(unittest.TestCase):
     13class FingerTests(unittest.TestCase):
    1414    """
    1515    Tests for L{finger.Finger}.
    1616    """
  • twisted/test/test_formmethod.py

    diff --git twisted/test/test_formmethod.py twisted/test/test_formmethod.py
    index 845c4e2..41d3601 100644
    from twisted.trial import unittest 
    1111from twisted.python import formmethod
    1212
    1313
    14 class ArgumentTestCase(unittest.TestCase):
     14class ArgumentTests(unittest.TestCase):
    1515
    1616    def argTest(self, argKlass, testPairs, badValues, *args, **kwargs):
    1717        arg = argKlass("name", *args, **kwargs)
  • twisted/test/test_ftp.py

    diff --git twisted/test/test_ftp.py twisted/test/test_ftp.py
    index f1e5b46..bbfaf40 100644
    class FTPServerTestCase(unittest.TestCase): 
    176176
    177177
    178178
    179 class FTPAnonymousTestCase(FTPServerTestCase):
     179class FTPAnonymousTests(FTPServerTestCase):
    180180    """
    181181    Simple tests for an FTP server with different anonymous username.
    182182    The new anonymous username used in this test case is "guest"
    class FTPAnonymousTestCase(FTPServerTestCase): 
    200200
    201201
    202202
    203 class BasicFTPServerTestCase(FTPServerTestCase):
     203class BasicFTPServerTests(FTPServerTestCase):
    204204    def testNotLoggedInReply(self):
    205205        """
    206206        When not logged in, most commands other than USER and PASS should
    class BasicFTPServerTestCase(FTPServerTestCase): 
    603603
    604604
    605605
    606 class FTPServerTestCaseAdvancedClient(FTPServerTestCase):
     606class FTPServerAdvancedClientTests(FTPServerTestCase):
    607607    """
    608608    Test FTP server with the L{ftp.FTPClient} class.
    609609    """
    class FTPServerTestCaseAdvancedClient(FTPServerTestCase): 
    715715
    716716
    717717
    718 class FTPServerPasvDataConnectionTestCase(FTPServerTestCase):
     718class FTPServerPasvDataConnectionTests(FTPServerTestCase):
    719719    def _makeDataConnection(self, ignored=None):
    720720        # Establish a passive data connection (i.e. client connecting to
    721721        # server).
    class FTPServerPasvDataConnectionTestCase(FTPServerTestCase): 
    10241024
    10251025
    10261026
    1027 class FTPServerPortDataConnectionTestCase(FTPServerPasvDataConnectionTestCase):
     1027class FTPServerPortDataConnectionTests(FTPServerPasvDataConnectionTests):
    10281028    def setUp(self):
    10291029        self.dataPorts = []
    1030         return FTPServerPasvDataConnectionTestCase.setUp(self)
     1030        return FTPServerPasvDataConnectionTests.setUp(self)
    10311031
    10321032    def _makeDataConnection(self, ignored=None):
    10331033        # Establish an active data connection (i.e. server connecting to
    class FTPServerPortDataConnectionTestCase(FTPServerPasvDataConnectionTestCase): 
    10481048    def tearDown(self):
    10491049        l = [defer.maybeDeferred(port.stopListening) for port in self.dataPorts]
    10501050        d = defer.maybeDeferred(
    1051             FTPServerPasvDataConnectionTestCase.tearDown, self)
     1051            FTPServerPasvDataConnectionTests.tearDown, self)
    10521052        l.append(d)
    10531053        return defer.DeferredList(l, fireOnOneErrback=True)
    10541054
    class FTPFileListingTests(unittest.TestCase): 
    14191419
    14201420
    14211421
    1422 class FTPClientTests(unittest.TestCase):
     1422class FTPClientFailedRETRAndErrbacksUponDisconnectTests(unittest.TestCase):
    14231423
    14241424    def testFailedRETR(self):
    14251425        f = protocol.Factory()
    class FTPClientTests(unittest.TestCase): 
    14721472
    14731473
    14741474
    1475 class FTPClientTestCase(unittest.TestCase):
     1475class FTPClientTests(unittest.TestCase):
    14761476    """
    14771477    Test advanced FTP client commands.
    14781478    """
    class FTPClientBasicTests(unittest.TestCase): 
    25192519
    25202520
    25212521
    2522 class PathHandling(unittest.TestCase):
     2522class PathHandlingTests(unittest.TestCase):
    25232523    def testNormalizer(self):
    25242524        for inp, outp in [('a', ['a']),
    25252525                          ('/a', ['a']),
    class BaseFTPRealmTests(unittest.TestCase): 
    26672667
    26682668
    26692669
    2670 class FTPRealmTestCase(unittest.TestCase):
     2670class FTPRealmTests(unittest.TestCase):
    26712671    """
    26722672    Tests for L{ftp.FTPRealm}.
    26732673    """
    class SystemFTPRealmTests(unittest.TestCase): 
    27332733
    27342734
    27352735
    2736 class ErrnoToFailureTestCase(unittest.TestCase):
     2736class ErrnoToFailureTests(unittest.TestCase):
    27372737    """
    27382738    Tests for L{ftp.errnoToFailure} errno checking.
    27392739    """
    class ErrnoToFailureTestCase(unittest.TestCase): 
    27992799
    28002800
    28012801
    2802 class AnonymousFTPShellTestCase(unittest.TestCase):
     2802class AnonymousFTPShellTests(unittest.TestCase):
    28032803    """
    28042804    Test anonymous shell properties.
    28052805    """
    class IFTPShellTestsMixin: 
    32443244
    32453245
    32463246
    3247 class FTPShellTestCase(unittest.TestCase, IFTPShellTestsMixin):
     3247class FTPShellTests(unittest.TestCase, IFTPShellTestsMixin):
    32483248    """
    32493249    Tests for the C{ftp.FTPShell} object.
    32503250    """
    class IReadWriteTestsMixin: 
    34133413
    34143414
    34153415
    3416 class FTPReadWriteTestCase(unittest.TestCase, IReadWriteTestsMixin):
     3416class FTPReadWriteTests(unittest.TestCase, IReadWriteTestsMixin):
    34173417    """
    34183418    Tests for C{ftp._FileReader} and C{ftp._FileWriter}, the objects returned
    34193419    by the shell in C{openForReading}/C{openForWriting}.
    class CloseTestShell: 
    34713471
    34723472
    34733473
    3474 class FTPCloseTest(unittest.TestCase):
     3474class FTPCloseTests(unittest.TestCase):
    34753475    """Tests that the server invokes IWriteFile.close"""
    34763476
    34773477    def test_write(self):
  • twisted/test/test_ftp_options.py

    diff --git twisted/test/test_ftp_options.py twisted/test/test_ftp_options.py
    index e668502..b5e02e4 100644
    from twisted.python.filepath import FilePath 
    1414
    1515
    1616
    17 class FTPOptionsTestCase(TestCase):
     17class FTPOptionsTests(TestCase):
    1818    """
    1919    Tests for the command line option parser used for C{twistd ftp}.
    2020    """
  • twisted/test/test_hook.py

    diff --git twisted/test/test_hook.py twisted/test/test_hook.py
    index 7d17f76..12f3d2b 100644
    def subPost(sub, a, b): 
    8080    """
    8181    sub.calledSubPost = sub.calledSubPost + 1
    8282
    83 class HookTestCase(unittest.TestCase):
     83class HookTests(unittest.TestCase):
    8484    """
    8585    test case to make sure hooks are called
    8686    """
    class HookTestCase(unittest.TestCase): 
    147147        self.assertEqual(sub.calledSubPre, 2)
    148148        self.assertEqual(sub.calledSub, 3)
    149149
    150 testCases = [HookTestCase]
     150testCases = [HookTests]
  • twisted/test/test_htb.py

    diff --git twisted/test/test_htb.py twisted/test/test_htb.py
    index f499a8f..5b2e4bf 100644
    class TestBucketBase(unittest.TestCase): 
    2626    def tearDown(self):
    2727        htb.time = self._realTimeFunc
    2828
    29 class TestBucket(TestBucketBase):
     29class BucketTests(TestBucketBase):
    3030    def testBucketSize(self):
    3131        """Testing the size of the bucket."""
    3232        b = SomeBucket()
    class TestBucket(TestBucketBase): 
    5454        empty = b.drip()
    5555        self.assertTrue(empty)
    5656
    57 class TestBucketNesting(TestBucketBase):
     57class BucketNestingTests(TestBucketBase):
    5858    def setUp(self):
    5959        TestBucketBase.setUp(self)
    6060        self.parent = SomeBucket()
    class TestBucketNesting(TestBucketBase): 
    8585
    8686from test_pcp import DummyConsumer
    8787
    88 class ConsumerShaperTest(TestBucketBase):
     88class ConsumerShaperTests(TestBucketBase):
    8989    def setUp(self):
    9090        TestBucketBase.setUp(self)
    9191        self.underlying = DummyConsumer()
  • twisted/test/test_ident.py

    diff --git twisted/test/test_ident.py twisted/test/test_ident.py
    index 9f69322..8c71b52 100644
    from twisted.test.proto_helpers import StringTransport 
    1818
    1919
    2020
    21 class ClassParserTestCase(unittest.TestCase):
     21class ClassParserTests(unittest.TestCase):
    2222    """
    2323    Test parsing of ident responses.
    2424    """
    class NewException(RuntimeError): 
    9696    pass
    9797
    9898
    99 class ServerParserTestCase(unittest.TestCase):
     99class ServerParserTests(unittest.TestCase):
    100100    def testErrors(self):
    101101        p = TestErrorIdentServer()
    102102        p.makeConnection(StringTransport())
    else: 
    152152    _addr2 = '01020304'
    153153
    154154
    155 class ProcMixinTestCase(unittest.TestCase):
     155class ProcMixinTests(unittest.TestCase):
    156156    line = ('4: %s:0019 %s:02FA 0A 00000000:00000000 '
    157157            '00:00000000 00000000     0        0 10927 1 f72a5b80 '
    158158            '3000 0 0 2 -1') % (_addr1, _addr2)
  • twisted/test/test_internet.py

    diff --git twisted/test/test_internet.py twisted/test/test_internet.py
    index eb5bfad..4cc9dae 100644
    class ThreePhaseEventTests(unittest.TestCase): 
    345345
    346346
    347347
    348 class SystemEventTestCase(unittest.TestCase):
     348class SystemEventTests(unittest.TestCase):
    349349    """
    350350    Tests for the reactor's implementation of the C{fireSystemEvent},
    351351    C{addSystemEventTrigger}, and C{removeSystemEventTrigger} methods of the
    class SystemEventTestCase(unittest.TestCase): 
    649649
    650650
    651651
    652 class TimeTestCase(unittest.TestCase):
     652class TimeTests(unittest.TestCase):
    653653    """
    654654    Tests for the IReactorTime part of the reactor.
    655655    """
    class TimeTestCase(unittest.TestCase): 
    828828        self.assertEqual(dc.getTime(), 13)
    829829
    830830
    831 class CallFromThreadTests(unittest.TestCase):
     831class CallFromThreadStopsAndWakeUpTests(unittest.TestCase):
    832832    def testWakeUp(self):
    833833        # Make sure other threads can wake up the reactor
    834834        d = Deferred()
    class CallFromThreadTests(unittest.TestCase): 
    870870        return d
    871871
    872872
    873 class DelayedTestCase(unittest.TestCase):
     873class DelayedTests(unittest.TestCase):
    874874    def setUp(self):
    875875        self.finished = 0
    876876        self.counter = 0
    class ChildResolveProtocol(protocol.ProcessProtocol): 
    997997        self.onCompletion = None
    998998
    999999
    1000 class Resolve(unittest.TestCase):
     1000class ResolveTests(unittest.TestCase):
    10011001    def testChildResolve(self):
    10021002        # I've seen problems with reactor.run under gtk2reactor. Spawn a
    10031003        # child which just does reactor.resolve after the reactor has
    if not interfaces.IReactorProcess(reactor, None): 
    10391039
    10401040
    10411041
    1042 class CallFromThreadTestCase(unittest.TestCase):
     1042class CallFromThreadTests(unittest.TestCase):
    10431043    """
    10441044    Task scheduling from threads tests.
    10451045    """
    class MyFactory(protocol.Factory): 
    11211121    protocol = MyProtocol
    11221122
    11231123
    1124 class ProtocolTestCase(unittest.TestCase):
     1124class ProtocolTests(unittest.TestCase):
    11251125
    11261126    def testFactory(self):
    11271127        factory = MyFactory()
    class ReentrantProducer(DummyProducer): 
    12121212
    12131213
    12141214
    1215 class TestProducer(unittest.TestCase):
     1215class ProducerTests(unittest.TestCase):
    12161216    """
    12171217    Test abstract.FileDescriptor's consumer interface.
    12181218    """
    class TestProducer(unittest.TestCase): 
    13411341
    13421342
    13431343
    1344 class PortStringification(unittest.TestCase):
     1344class PortStringificationTests(unittest.TestCase):
    13451345    if interfaces.IReactorTCP(reactor, None) is not None:
    13461346        def testTCP(self):
    13471347            p = reactor.listenTCP(0, protocol.ServerFactory())
  • twisted/test/test_jelly.py

    diff --git twisted/test/test_jelly.py twisted/test/test_jelly.py
    index 3a21c21..f11fd55 100644
    class SimpleJellyTest: 
    112112
    113113
    114114
    115 class JellyTestCase(unittest.TestCase):
     115class JellyTests(unittest.TestCase):
    116116    """
    117117    Testcases for L{jelly} module serialization.
    118118
    class ClassB(pb.Copyable, pb.RemoteCopy): 
    627627
    628628
    629629
    630 class CircularReferenceTestCase(unittest.TestCase):
     630class CircularReferenceTests(unittest.TestCase):
    631631    """
    632632    Tests for circular references handling in the jelly/unjelly process.
    633633    """
  • twisted/test/test_lockfile.py

    diff --git twisted/test/test_lockfile.py twisted/test/test_lockfile.py
    index 1e4cc20..59e0e8d 100644
    class UtilTests(unittest.TestCase): 
    121121
    122122
    123123
    124 class LockingTestCase(unittest.TestCase):
     124class LockingTests(unittest.TestCase):
    125125    def _symlinkErrorTest(self, errno):
    126126        def fakeSymlink(source, dest):
    127127            raise OSError(errno, None)
  • twisted/test/test_log.py

    diff --git twisted/test/test_log.py twisted/test/test_log.py
    index dfeaf06..964adf5 100644
    class FakeWarning(Warning): 
    3636
    3737
    3838
    39 class TextFromEventDictTest(unittest.SynchronousTestCase):
     39class TextFromEventDictTests(unittest.SynchronousTestCase):
    4040    """
    4141    Tests for L{textFromEventDict}.
    4242    """
    class TextFromEventDictTest(unittest.SynchronousTestCase): 
    113113
    114114
    115115
    116 class LogTest(unittest.SynchronousTestCase):
     116class LogTests(unittest.SynchronousTestCase):
    117117
    118118    def setUp(self):
    119119        self.catcher = []
    class LogPublisherTestCaseMixin: 
    373373
    374374
    375375
    376 class LogPublisherTestCase(LogPublisherTestCaseMixin,
    377                            unittest.SynchronousTestCase):
     376class LogPublisherTests(LogPublisherTestCaseMixin,
     377                        unittest.SynchronousTestCase):
    378378    def testSingleString(self):
    379379        self.lp.msg("Hello, world.")
    380380        self.assertEqual(len(self.out), 1)
    class LogPublisherTestCase(LogPublisherTestCaseMixin, 
    407407
    408408
    409409
    410 class FileObserverTestCase(LogPublisherTestCaseMixin,
    411                            unittest.SynchronousTestCase):
     410class FileObserverTests(LogPublisherTestCaseMixin,
     411                        unittest.SynchronousTestCase):
    412412    """
    413413    Tests for L{log.FileObserver}.
    414414    """
    class FileObserverTestCase(LogPublisherTestCaseMixin, 
    790790
    791791
    792792
    793 class PythonLoggingObserverTestCase(unittest.SynchronousTestCase):
     793class PythonLoggingObserverTests(unittest.SynchronousTestCase):
    794794    """
    795795    Test the bridge with python logging module.
    796796    """
    class PythonLoggingObserverTestCase(unittest.SynchronousTestCase): 
    870870
    871871
    872872
    873 class PythonLoggingIntegrationTestCase(unittest.SynchronousTestCase):
     873class PythonLoggingIntegrationTests(unittest.SynchronousTestCase):
    874874    """
    875875    Test integration of python logging bridge.
    876876    """
    class PythonLoggingIntegrationTestCase(unittest.SynchronousTestCase): 
    917917
    918918
    919919
    920 class DefaultObserverTestCase(unittest.SynchronousTestCase):
     920class DefaultObserverTests(unittest.SynchronousTestCase):
    921921    """
    922922    Test the default observer.
    923923    """
    class DefaultObserverTestCase(unittest.SynchronousTestCase): 
    965965
    966966
    967967
    968 class StdioOnnaStickTestCase(unittest.SynchronousTestCase):
     968class StdioOnnaStickTests(unittest.SynchronousTestCase):
    969969    """
    970970    StdioOnnaStick should act like the normal sys.stdout object.
    971971    """
  • twisted/test/test_logfile.py

    diff --git twisted/test/test_logfile.py twisted/test/test_logfile.py
    index b5b9e8f..3d84389 100644
    from twisted.trial import unittest 
    77from twisted.python import logfile, runtime
    88
    99
    10 class LogFileTestCase(unittest.TestCase):
     10class LogFileTests(unittest.TestCase):
    1111    """
    1212    Test the rotating log file.
    1313    """
    class RiggedDailyLogFile(logfile.DailyLogFile): 
    271271            return time.gmtime(*args)[:3]
    272272        return time.gmtime(self._clock)[:3]
    273273
    274 class DailyLogFileTestCase(unittest.TestCase):
     274class DailyLogFileTests(unittest.TestCase):
    275275    """
    276276    Test rotating log file.
    277277    """
  • twisted/test/test_loopback.py

    diff --git twisted/test/test_loopback.py twisted/test/test_loopback.py
    index cdd4dab..9e757d3 100644
    class LoopbackTestCaseMixin: 
    8686
    8787
    8888
    89 class LoopbackAsyncTestCase(LoopbackTestCaseMixin, unittest.TestCase):
     89class LoopbackAsyncTests(LoopbackTestCaseMixin, unittest.TestCase):
    9090    loopbackFunc = staticmethod(loopback.loopbackAsync)
    9191
    9292
    class LoopbackAsyncTestCase(LoopbackTestCaseMixin, unittest.TestCase): 
    417417
    418418
    419419
    420 class LoopbackTCPTestCase(LoopbackTestCaseMixin, unittest.TestCase):
     420class LoopbackTCPTests(LoopbackTestCaseMixin, unittest.TestCase):
    421421    loopbackFunc = staticmethod(loopback.loopbackTCP)
    422422
    423423
    424 class LoopbackUNIXTestCase(LoopbackTestCaseMixin, unittest.TestCase):
     424class LoopbackUNIXTests(LoopbackTestCaseMixin, unittest.TestCase):
    425425    loopbackFunc = staticmethod(loopback.loopbackUNIX)
    426426
    427427    if interfaces.IReactorUNIX(reactor, None) is None:
  • twisted/test/test_manhole.py

    diff --git twisted/test/test_manhole.py twisted/test/test_manhole.py
    index 0d8f316..9a9832e 100644
    class DummyManholeClient(LocalAsRemote): 
    4040    sync_setZero = setZero
    4141    sync_getMessages = getMessages
    4242
    43 class ManholeTest(unittest.TestCase):
     43class ManholeTests(unittest.TestCase):
    4444    """Various tests for the manhole service.
    4545
    4646    Both the importIdentity and importMain tests are known to fail
  • twisted/test/test_memcache.py

    diff --git twisted/test/test_memcache.py twisted/test/test_memcache.py
    index f961a04..732feba 100644
    class CommandMixin: 
    230230
    231231
    232232
    233 class MemCacheTestCase(CommandMixin, TestCase):
     233class MemCacheTests(CommandMixin, TestCase):
    234234    """
    235235    Test client protocol class L{MemCacheProtocol}.
    236236    """
  • twisted/test/test_modules.py

    diff --git twisted/test/test_modules.py twisted/test/test_modules.py
    index 78d2f94..ddca25d 100644
    class BasicTests(TwistedModulesTestCase): 
    321321
    322322
    323323
    324 class PathModificationTest(TwistedModulesTestCase):
     324class PathModificationTests(TwistedModulesTestCase):
    325325    """
    326326    These tests share setup/cleanup behavior of creating a dummy package and
    327327    stuffing some code in it.
    class PathModificationTest(TwistedModulesTestCase): 
    412412
    413413
    414414
    415 class RebindingTest(PathModificationTest):
     415class RebindingTests(PathModificationTests):
    416416    """
    417417    These tests verify that the default path interrogation API works properly
    418418    even when sys.path has been rebound to a different object.
    class RebindingTest(PathModificationTest): 
    434434
    435435
    436436
    437 class ZipPathModificationTest(PathModificationTest):
     437class ZipPathModificationTests(PathModificationTests):
    438438    def _setupSysPath(self):
    439439        assert not self.pathSetUp
    440440        zipit(self.pathExtensionName, self.pathExtensionName+'.zip')
    441441        self.pathExtensionName += '.zip'
    442442        assert zipfile.is_zipfile(self.pathExtensionName)
    443         PathModificationTest._setupSysPath(self)
     443        PathModificationTests._setupSysPath(self)
    444444
    445445
    446 class PythonPathTestCase(TestCase):
     446class PythonPathTests(TestCase):
    447447    """
    448448    Tests for the class which provides the implementation for all of the
    449449    public API of L{twisted.python.modules}, L{PythonPath}.
    class PythonPathTestCase(TestCase): 
    511511        self.assertNotIn('bogusModule', thePath)
    512512
    513513
    514 __all__ = ["BasicTests", "PathModificationTest", "RebindingTest",
    515            "ZipPathModificationTest", "PythonPathTestCase"]
     514__all__ = ["BasicTests", "PathModificationTests", "RebindingTests",
     515           "ZipPathModificationTests", "PythonPathTests"]
    516516
    517517if _PY3:
    518     __all3__ = ["BasicTests", "PathModificationTest", "RebindingTest",
    519                 "PythonPathTestCase"]
     518    __all3__ = ["BasicTests", "PathModificationTests", "RebindingTests",
     519                "PythonPathTests"]
    520520    for name in __all__[:]:
    521521        if name not in __all3__:
    522522            __all__.remove(name)
  • twisted/test/test_monkey.py

    diff --git twisted/test/test_monkey.py twisted/test/test_monkey.py
    index d289df4..245dbe5 100644
    class TestObj: 
    1919
    2020
    2121
    22 class MonkeyPatcherTest(unittest.SynchronousTestCase):
     22class MonkeyPatcherTests(unittest.SynchronousTestCase):
    2323    """
    2424    Tests for L{MonkeyPatcher} monkey-patching class.
    2525    """
  • twisted/test/test_newcred.py

    diff --git twisted/test/test_newcred.py twisted/test/test_newcred.py
    index bf9f325..5f093c2 100644
    class TestRealm: 
    7777        return (interfaces[0], interfaces[0](avatar),
    7878                avatar.logout)
    7979
    80 class NewCredTest(unittest.TestCase):
     80class NewCredTests(unittest.TestCase):
    8181    def setUp(self):
    8282        r = self.realm = TestRealm()
    8383        p = self.portal = portal.Portal(r)
    class NewCredTest(unittest.TestCase): 
    151151        self.assertEqual(error.UnauthorizedLogin, l[0])
    152152
    153153
    154 class CramMD5CredentialsTestCase(unittest.TestCase):
     154class CramMD5CredentialsTests(unittest.TestCase):
    155155    def testIdempotentChallenge(self):
    156156        c = credentials.CramMD5Credentials()
    157157        chal = c.getChallenge()
    class CramMD5CredentialsTestCase(unittest.TestCase): 
    167167        c = credentials.CramMD5Credentials()
    168168        self.failIf(c.checkPassword('secret'))
    169169
    170 class OnDiskDatabaseTestCase(unittest.TestCase):
     170class OnDiskDatabaseTests(unittest.TestCase):
    171171    users = [
    172172        ('user1', 'pass1'),
    173173        ('user2', 'pass2'),
    class OnDiskDatabaseTestCase(unittest.TestCase): 
    226226
    227227
    228228
    229 class HashedPasswordOnDiskDatabaseTestCase(unittest.TestCase):
     229class HashedPasswordOnDiskDatabaseTests(unittest.TestCase):
    230230    users = [
    231231        ('user1', 'pass1'),
    232232        ('user2', 'pass2'),
    class HashedPasswordOnDiskDatabaseTestCase(unittest.TestCase): 
    287287    if crypt is None:
    288288        skip = "crypt module not available"
    289289
    290 class PluggableAuthenticationModulesTest(unittest.TestCase):
     290class PluggableAuthenticationModulesTests(unittest.TestCase):
    291291
    292292    def setUp(self):
    293293        """
    class NetworkHashedFilePasswordDBMixin(HashlessFilePasswordDBMixin): 
    446446        def checkPassword(self, password):
    447447            return self.hashed.decode('hex') == password
    448448
    449 class HashlessFilePasswordDBCheckerTestCase(HashlessFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
     449class HashlessFilePasswordDBCheckerTests(HashlessFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
    450450    pass
    451451
    452 class LocallyHashedFilePasswordDBCheckerTestCase(LocallyHashedFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
     452class LocallyHashedFilePasswordDBCheckerTests(LocallyHashedFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
    453453    pass
    454454
    455 class NetworkHashedFilePasswordDBCheckerTestCase(NetworkHashedFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
     455class NetworkHashedFilePasswordDBCheckerTests(NetworkHashedFilePasswordDBMixin, CheckersMixin, unittest.TestCase):
    456456    pass
    457457
  • twisted/test/test_nmea.py

    diff --git twisted/test/test_nmea.py twisted/test/test_nmea.py
    index 69e1f8a..35bb18d 100644
    class NMEATester(nmea.NMEAReceiver): 
    4343        for fn in reflect.prefixedMethodNames(self.__class__, 'decode_'):
    4444            setattr(self, 'handle_' + fn, self.resultHarvester)
    4545       
    46 class NMEAReceiverTestCase(unittest.TestCase):
     46class NMEAReceiverTests(unittest.TestCase):
    4747    messages = (
    4848        # fix - signal acquired
    4949        "$GPGGA,231713.0,3910.413,N,07641.994,W,1,05,1.35,00044,M,-033,M,,*69",
    class NMEAReceiverTestCase(unittest.TestCase): 
    112112            else:
    113113              self.assertEqual(expectedResult, actualResult, "\nInput:\n%s\nExpected: %r\nResults: %r\n" % (message, expectedResult, actualResult))
    114114
    115 testCases = [NMEAReceiverTestCase]
     115testCases = [NMEAReceiverTests]
  • twisted/test/test_paths.py

    diff --git twisted/test/test_paths.py twisted/test/test_paths.py
    index ddd17a4..2ff7046 100644
    class BytesTestCase(TestCase): 
    3333
    3434
    3535
    36 class AbstractFilePathTestCase(BytesTestCase):
     36class AbstractFilePathTests(BytesTestCase):
    3737    """
    3838    Tests for L{IFilePath} implementations.
    3939    """
    class ExplodingFilePath(filepath.FilePath): 
    432432
    433433
    434434
    435 class PermissionsTestCase(BytesTestCase):
     435class PermissionsTests(BytesTestCase):
    436436    """
    437437    Test Permissions and RWX classes
    438438    """
    class PermissionsTestCase(BytesTestCase): 
    579579
    580580
    581581
    582 class FilePathTestCase(AbstractFilePathTestCase):
     582class FilePathTests(AbstractFilePathTests):
    583583    """
    584584    Test various L{FilePath} path manipulations.
    585585
  • twisted/test/test_pb.py

    diff --git twisted/test/test_pb.py twisted/test/test_pb.py
    index 4616708..9224d27 100644
    class CachedReturner(pb.Root): 
    369369        return self.cache
    370370
    371371
    372 class NewStyleTestCase(unittest.TestCase):
     372class NewStyleTests(unittest.TestCase):
    373373    def setUp(self):
    374374        """
    375375        Create a pb server using L{Echoer} protocol and connect a client to it.
    class ConnectionNotifyServerFactory(pb.PBServerFactory): 
    466466
    467467
    468468
    469 class NewStyleCachedTestCase(unittest.TestCase):
     469class NewStyleCachedTests(unittest.TestCase):
    470470    def setUp(self):
    471471        """
    472472        Create a pb server using L{CachedReturner} protocol and connect a
    class NewStyleCachedTestCase(unittest.TestCase): 
    520520
    521521
    522522
    523 class BrokerTestCase(unittest.TestCase):
     523class BrokerTests(unittest.TestCase):
    524524    thunkResult = None
    525525
    526526    def tearDown(self):
    class FilePagerizer(pb.Referenceable): 
    832832
    833833
    834834
    835 class PagingTestCase(unittest.TestCase):
     835class PagingTests(unittest.TestCase):
    836836    """
    837837    Test pb objects sending data by pages.
    838838    """
    class GetPublisher(pb.Referenceable): 
    966966
    967967pb.setUnjellyableForClass(DumbPublishable, DumbPub)
    968968
    969 class DisconnectionTestCase(unittest.TestCase):
     969class DisconnectionTests(unittest.TestCase):
    970970    """
    971971    Test disconnection callbacks.
    972972    """
    class NewCredLeakTests(unittest.TestCase): 
    12131213
    12141214
    12151215
    1216 class NewCredTestCase(unittest.TestCase):
     1216class NewCredTests(unittest.TestCase):
    12171217    """
    12181218    Tests related to the L{twisted.cred} support in PB.
    12191219    """
    class NonSubclassingPerspective: 
    16481648
    16491649
    16501650
    1651 class NSPTestCase(unittest.TestCase):
     1651class NSPTests(unittest.TestCase):
    16521652    """
    16531653    Tests for authentication against a realm where the L{IPerspective}
    16541654    implementation is not a subclass of L{Avatar}.
    class Forwarded: 
    17361736        return succeed(True)
    17371737
    17381738
    1739 class SpreadUtilTestCase(unittest.TestCase):
     1739class SpreadUtilTests(unittest.TestCase):
    17401740    """
    17411741    Tests for L{twisted.spread.util}.
    17421742    """
    class SpreadUtilTestCase(unittest.TestCase): 
    17991799
    18001800
    18011801
    1802 class PBWithSecurityOptionsTest(unittest.TestCase):
     1802class PBWithSecurityOptionsTests(unittest.TestCase):
    18031803    """
    18041804    Test security customization.
    18051805    """
  • twisted/test/test_pbfailure.py

    diff --git twisted/test/test_pbfailure.py twisted/test/test_pbfailure.py
    index 6beaf1b..4463c69 100644
    class PBConnTestCase(unittest.TestCase): 
    166166
    167167
    168168
    169 class PBFailureTest(PBConnTestCase):
     169class PBFailureTests(PBConnTestCase):
    170170    compare = unittest.TestCase.assertEqual
    171171
    172172
    class PBFailureTest(PBConnTestCase): 
    394394
    395395
    396396
    397 class PBFailureTestUnsafe(PBFailureTest):
     397class PBFailureUnsafeTests(PBFailureTests):
    398398    compare = unittest.TestCase.failIfEquals
    399399    unsafeTracebacks = 1
    400400
  • twisted/test/test_pcp.py

    diff --git twisted/test/test_pcp.py twisted/test/test_pcp.py
    index 06229c0..79e4591 100644
    class DummyConsumer(DummyTransport): 
    7676    def finish(self):
    7777        self.finished = True
    7878
    79 class TransportInterfaceTest(unittest.TestCase):
     79class TransportInterfaceTests(unittest.TestCase):
    8080    proxyClass = pcp.BasicProducerConsumerProxy
    8181
    8282    def setUp(self):
    class ProducerInterfaceTest: 
    179179                    "Stopped producer should not have sent data.")
    180180
    181181
    182 class PCP_ConsumerInterfaceTest(ConsumerInterfaceTest, unittest.TestCase):
     182class PCP_ConsumerInterfaceTests(ConsumerInterfaceTest, unittest.TestCase):
    183183    proxyClass = pcp.BasicProducerConsumerProxy
    184184
    185 class PCPII_ConsumerInterfaceTest(ConsumerInterfaceTest, unittest.TestCase):
     185class PCPII_ConsumerInterfaceTests(ConsumerInterfaceTest, unittest.TestCase):
    186186    proxyClass = pcp.ProducerConsumerProxy
    187187
    188 class PCP_ProducerInterfaceTest(ProducerInterfaceTest, unittest.TestCase):
     188class PCP_ProducerInterfaceTests(ProducerInterfaceTest, unittest.TestCase):
    189189    proxyClass = pcp.BasicProducerConsumerProxy
    190190
    191 class PCPII_ProducerInterfaceTest(ProducerInterfaceTest, unittest.TestCase):
     191class PCPII_ProducerInterfaceTests(ProducerInterfaceTest, unittest.TestCase):
    192192    proxyClass = pcp.ProducerConsumerProxy
    193193
    194 class ProducerProxyTest(unittest.TestCase):
     194class ProducerProxyTests(unittest.TestCase):
    195195    """Producer methods on me should be relayed to the Producer I proxy.
    196196    """
    197197    proxyClass = pcp.BasicProducerConsumerProxy
    class ProducerProxyTest(unittest.TestCase): 
    206206        self.failUnless(self.parentProducer.stopped)
    207207
    208208
    209 class ConsumerProxyTest(unittest.TestCase):
     209class ConsumerProxyTests(unittest.TestCase):
    210210    """Consumer methods on me should be relayed to the Consumer I proxy.
    211211    """
    212212    proxyClass = pcp.BasicProducerConsumerProxy
    class PullProducerTest: 
    264264        # This data should answer that pull request.
    265265        self.assertEqual(self.underlying.getvalue(), "data")
    266266
    267 class PCP_PullProducerTest(PullProducerTest, unittest.TestCase):
     267class PCP_PullProducerTests(PullProducerTest, unittest.TestCase):
    268268    class proxyClass(pcp.BasicProducerConsumerProxy):
    269269        iAmStreaming = False
    270270
    271 class PCPII_PullProducerTest(PullProducerTest, unittest.TestCase):
     271class PCPII_PullProducerTests(PullProducerTest, unittest.TestCase):
    272272    class proxyClass(pcp.ProducerConsumerProxy):
    273273        iAmStreaming = False
    274274
    275275# Buffering!
    276276
    277 class BufferedConsumerTest(unittest.TestCase):
     277class BufferedConsumerTests(unittest.TestCase):
    278278    """As a consumer, ask the producer to pause after too much data."""
    279279
    280280    proxyClass = pcp.ProducerConsumerProxy
  • twisted/test/test_persisted.py

    diff --git twisted/test/test_persisted.py twisted/test/test_persisted.py
    index af549b0..3481f3a 100644
    except ImportError: 
    2222from twisted.persisted import styles, aot, crefutil
    2323
    2424
    25 class VersionTestCase(unittest.TestCase):
     25class VersionTests(unittest.TestCase):
    2626    def test_nullVersionUpgrade(self):
    2727        global NullVersioned
    2828        class NullVersioned:
    class MyEphemeral(styles.Ephemeral): 
    181181        self.x = x
    182182
    183183
    184 class EphemeralTestCase(unittest.TestCase):
     184class EphemeralTests(unittest.TestCase):
    185185
    186186    def test_ephemeral(self):
    187187        o = MyEphemeral(3)
    class B: 
    220220def funktion():
    221221    pass
    222222
    223 class PicklingTestCase(unittest.TestCase):
     223class PicklingTests(unittest.TestCase):
    224224    """Test pickling of extra object types."""
    225225   
    226226    def test_module(self):
    class NonDictState: 
    261261    def __setstate__(self, state):
    262262        self.state = state
    263263
    264 class AOTTestCase(unittest.TestCase):
     264class AOTTests(unittest.TestCase):
    265265    def test_simpleTypes(self):
    266266        obj = (1, 2.0, 3j, True, slice(1, 2, 3), 'hello', u'world', sys.maxint + 1, None, Ellipsis)
    267267        rtObj = aot.unjellyFromSource(aot.jellyToSource(obj))
    class AOTTestCase(unittest.TestCase): 
    350350        assert oj.c is not oj.c.c
    351351
    352352
    353 class CrefUtilTestCase(unittest.TestCase):
     353class CrefUtilTests(unittest.TestCase):
    354354    """
    355355    Tests for L{crefutil}.
    356356    """
    class CrefUtilTestCase(unittest.TestCase): 
    373373
    374374
    375375
    376 testCases = [VersionTestCase, EphemeralTestCase, PicklingTestCase]
     376testCases = [VersionTests, EphemeralTests, PicklingTests]
    377377
  • twisted/test/test_plugin.py

    diff --git twisted/test/test_plugin.py twisted/test/test_plugin.py
    index c33ecf1..aac4940 100644
    class ITestPlugin2(Interface): 
    3636
    3737
    3838
    39 class PluginTestCase(unittest.TestCase):
     39class PluginTests(unittest.TestCase):
    4040    """
    4141    Tests which verify the behavior of the current, active Twisted plugins
    4242    directory.
  • twisted/test/test_policies.py

    diff --git twisted/test/test_policies.py twisted/test/test_policies.py
    index 55831ec..47bc406 100644
    class TestableTimeoutFactory(policies.TimeoutFactory): 
    121121
    122122
    123123
    124 class WrapperTestCase(unittest.TestCase):
     124class WrapperTests(unittest.TestCase):
    125125    """
    126126    Tests for L{WrappingFactory} and L{ProtocolWrapper}.
    127127    """
    class WrappingFactory(policies.WrappingFactory): 
    345345
    346346
    347347
    348 class ThrottlingTestCase(unittest.TestCase):
     348class ThrottlingTests(unittest.TestCase):
    349349    """
    350350    Tests for L{policies.ThrottlingFactory}.
    351351    """
    class ThrottlingTestCase(unittest.TestCase): 
    498498
    499499
    500500
    501 class TimeoutTestCase(unittest.TestCase):
     501class TimeoutFactoryTests(unittest.TestCase):
    502502    """
    503503    Tests for L{policies.TimeoutFactory}.
    504504    """
    class TimeoutTester(protocol.Protocol, policies.TimeoutMixin): 
    639639
    640640
    641641
    642 class TestTimeout(unittest.TestCase):
     642class TimeoutMixinTests(unittest.TestCase):
    643643    """
    644644    Tests for L{policies.TimeoutMixin}.
    645645    """
    class TestTimeout(unittest.TestCase): 
    737737
    738738
    739739
    740 class LimitTotalConnectionsFactoryTestCase(unittest.TestCase):
     740class LimitTotalConnectionsFactoryTests(unittest.TestCase):
    741741    """Tests for policies.LimitTotalConnectionsFactory"""
    742742    def testConnectionCounting(self):
    743743        # Make a basic factory
    class TestLoggingFactory(policies.TrafficLoggingFactory): 
    813813
    814814
    815815
    816 class LoggingFactoryTestCase(unittest.TestCase):
     816class LoggingFactoryTests(unittest.TestCase):
    817817    """
    818818    Tests for L{policies.TrafficLoggingFactory}.
    819819    """
  • twisted/test/test_postfix.py

    diff --git twisted/test/test_postfix.py twisted/test/test_postfix.py
    index 0f80a46..d121e44 100644
    from twisted.protocols import postfix 
    1010from twisted.test.proto_helpers import StringTransport
    1111
    1212
    13 class PostfixTCPMapQuoteTestCase(unittest.TestCase):
     13class PostfixTCPMapQuoteTests(unittest.TestCase):
    1414    data = [
    1515        # (raw, quoted, [aliasQuotedForms]),
    1616        ('foo', 'foo'),
    class PostfixTCPMapServerTestCase: 
    8989
    9090
    9191
    92 class Valid(PostfixTCPMapServerTestCase, unittest.TestCase):
     92class ValidTests(PostfixTCPMapServerTestCase, unittest.TestCase):
    9393    data = {
    9494        'foo': 'ThisIs Foo',
    9595        'bar': ' bar really is found\r\n',
  • twisted/test/test_process.py

    diff --git twisted/test/test_process.py twisted/test/test_process.py
    index 07faa90..59d786e 100644
    class GetEnvironmentDictionary(UtilityProcessProtocol): 
    485485
    486486
    487487
    488 class ProcessTestCase(unittest.TestCase):
     488class ProcessTests(unittest.TestCase):
    489489    """Test running a process."""
    490490
    491491    usePTY = False
    class TestTwoProcessesBase: 
    812812        reactor.callLater(2, self.close, 1)
    813813        return self._onClose()
    814814
    815 class TestTwoProcessesNonPosix(TestTwoProcessesBase, unittest.TestCase):
     815class TwoProcessesNonPosixTests(TestTwoProcessesBase, unittest.TestCase):
    816816    pass
    817817
    818 class TestTwoProcessesPosix(TestTwoProcessesBase, unittest.TestCase):
     818class TwoProcessesPosixTests(TestTwoProcessesBase, unittest.TestCase):
    819819    def tearDown(self):
    820820        for pp, pr in zip(self.pp, self.processes):
    821821            if not pp.finished:
    class FDChecker(protocol.ProcessProtocol): 
    937937        self.deferred.callback(None)
    938938
    939939
    940 class FDTest(unittest.TestCase):
     940class FDTests(unittest.TestCase):
    941941
    942942    def testFD(self):
    943943        exe = sys.executable
    if process is not None: 
    16611661
    16621662
    16631663
    1664 class MockProcessTestCase(unittest.TestCase):
     1664class MockProcessTests(unittest.TestCase):
    16651665    """
    16661666    Mock a process runner to test forked child code path.
    16671667    """
    class MockProcessTestCase(unittest.TestCase): 
    21052105
    21062106
    21072107
    2108 class PosixProcessTestCase(unittest.TestCase, PosixProcessBase):
     2108class PosixProcessTests(unittest.TestCase, PosixProcessBase):
    21092109    # add two non-pty test cases
    21102110
    21112111    def test_stderr(self):
    class PosixProcessTestCase(unittest.TestCase, PosixProcessBase): 
    21502150
    21512151
    21522152
    2153 class PosixProcessTestCasePTY(unittest.TestCase, PosixProcessBase):
     2153class PosixProcessPTYTests(unittest.TestCase, PosixProcessBase):
    21542154    """
    2155     Just like PosixProcessTestCase, but use ptys instead of pipes.
     2155    Just like PosixProcessTests, but use ptys instead of pipes.
    21562156    """
    21572157    usePTY = True
    21582158    # PTYs only offer one input and one output. What still makes sense?
    class Win32SignalProtocol(SignalProtocol): 
    22132213
    22142214
    22152215
    2216 class Win32ProcessTestCase(unittest.TestCase):
     2216class Win32ProcessTests(unittest.TestCase):
    22172217    """
    22182218    Test process programs that are packaged with twisted.
    22192219    """
    class Win32ProcessTestCase(unittest.TestCase): 
    23352335
    23362336
    23372337
    2338 class Win32UnicodeEnvironmentTest(unittest.TestCase):
     2338class Win32UnicodeEnvironmentTests(unittest.TestCase):
    23392339    """
    23402340    Tests for Unicode environment on Windows
    23412341    """
    class Win32UnicodeEnvironmentTest(unittest.TestCase): 
    23612361
    23622362
    23632363
    2364 class Dumbwin32procPidTest(unittest.TestCase):
     2364class Dumbwin32procPidTests(unittest.TestCase):
    23652365    """
    23662366    Simple test for the pid attribute of Process on win32.
    23672367    """
    class Dumbwin32procPidTest(unittest.TestCase): 
    23972397
    23982398
    23992399
    2400 class UtilTestCase(unittest.TestCase):
     2400class UtilTests(unittest.TestCase):
    24012401    """
    24022402    Tests for process-related helper functions (currently only
    24032403    L{procutils.which}.
    class ClosingPipesProcessProtocol(protocol.ProcessProtocol): 
    25082508
    25092509
    25102510
    2511 class ClosingPipes(unittest.TestCase):
     2511class ClosingPipesTests(unittest.TestCase):
    25122512
    25132513    def doit(self, fd):
    25142514        """
    class ClosingPipes(unittest.TestCase): 
    25912591
    25922592skipMessage = "wrong platform or reactor doesn't support IReactorProcess"
    25932593if (runtime.platform.getType() != 'posix') or (not interfaces.IReactorProcess(reactor, None)):
    2594     PosixProcessTestCase.skip = skipMessage
    2595     PosixProcessTestCasePTY.skip = skipMessage
    2596     TestTwoProcessesPosix.skip = skipMessage
    2597     FDTest.skip = skipMessage
     2594    PosixProcessTests.skip = skipMessage
     2595    PosixProcessPTYTests.skip = skipMessage
     2596    TwoProcessesPosixTests.skip = skipMessage
     2597    FDTests.skip = skipMessage
    25982598
    25992599if (runtime.platform.getType() != 'win32') or (not interfaces.IReactorProcess(reactor, None)):
    2600     Win32ProcessTestCase.skip = skipMessage
    2601     TestTwoProcessesNonPosix.skip = skipMessage
    2602     Dumbwin32procPidTest.skip = skipMessage
    2603     Win32UnicodeEnvironmentTest.skip = skipMessage
     2600    Win32ProcessTests.skip = skipMessage
     2601    TwoProcessesNonPosixTests.skip = skipMessage
     2602    Dumbwin32procPidTests.skip = skipMessage
     2603    Win32UnicodeEnvironmentTests.skip = skipMessage
    26042604
    26052605if not interfaces.IReactorProcess(reactor, None):
    2606     ProcessTestCase.skip = skipMessage
    2607     ClosingPipes.skip = skipMessage
     2606    ProcessTests.skip = skipMessage
     2607    ClosingPipesTests.skip = skipMessage
  • twisted/test/test_protocols.py

    diff --git twisted/test/test_protocols.py twisted/test/test_protocols.py
    index e2915d9..4e10b48 100644
    from twisted.internet import reactor, defer, address, protocol 
    1111from twisted.test import proto_helpers
    1212
    1313
    14 class WireTestCase(unittest.TestCase):
     14class WireTests(unittest.TestCase):
    1515    """
    1616    Test wire protocols.
    1717    """
    class TestableProxyFactory(portforward.ProxyFactory): 
    112112
    113113
    114114
    115 class Portforwarding(unittest.TestCase):
     115class PortforwardingTests(unittest.TestCase):
    116116    """
    117117    Test port forwarding.
    118118    """
    class Portforwarding(unittest.TestCase): 
    223223
    224224
    225225
    226 class StringTransportTestCase(unittest.TestCase):
     226class StringTransportTests(unittest.TestCase):
    227227    """
    228228    Test L{proto_helpers.StringTransport} helper behaviour.
    229229    """
  • twisted/test/test_randbytes.py

    diff --git twisted/test/test_randbytes.py twisted/test/test_randbytes.py
    index 6615f80..5e20da5 100644
    class SecureRandomTestCaseBase(object): 
    3535
    3636
    3737
    38 class SecureRandomTestCase(SecureRandomTestCaseBase, unittest.TestCase):
     38class SecureRandomTests(SecureRandomTestCaseBase, unittest.TestCase):
    3939    """
    4040    Test secureRandom under normal conditions.
    4141    """
    class SecureRandomTestCase(SecureRandomTestCaseBase, unittest.TestCase): 
    4949
    5050
    5151
    52 class ConditionalSecureRandomTestCase(SecureRandomTestCaseBase,
    53                                       unittest.SynchronousTestCase):
     52class ConditionalSecureRandomTests(SecureRandomTestCaseBase,
     53                                   unittest.SynchronousTestCase):
    5454    """
    5555    Test random sources one by one, then remove it to.
    5656    """
    class ConditionalSecureRandomTestCase(SecureRandomTestCaseBase, 
    9797
    9898
    9999
    100 class RandomTestCaseBase(SecureRandomTestCaseBase, unittest.SynchronousTestCase):
     100class RandomBaseTests(SecureRandomTestCaseBase, unittest.SynchronousTestCase):
    101101    """
    102102    'Normal' random test cases.
    103103    """
  • twisted/test/test_rebuild.py

    diff --git twisted/test/test_rebuild.py twisted/test/test_rebuild.py
    index aac8b81..7a6158f 100644
    unhashableObject = None # set in test_hashException 
    3636
    3737
    3838
    39 class RebuildTestCase(unittest.TestCase):
     39class RebuildTests(unittest.TestCase):
    4040    """
    4141    Simple testcase for rebuilding, to at least exercise the code.
    4242    """
    class RebuildTestCase(unittest.TestCase): 
    162162
    163163
    164164
    165 class NewStyleTestCase(unittest.TestCase):
     165class NewStyleTests(unittest.TestCase):
    166166    """
    167167    Tests for rebuilding new-style classes of various sorts.
    168168    """
  • twisted/test/test_reflect.py

    diff --git twisted/test/test_reflect.py twisted/test/test_reflect.py
    index 328c4c6..2745629 100644
    class AddMethodNamesToDictTests(TestCase): 
    177177
    178178class Summer(object):
    179179    """
    180     A class we look up as part of the LookupsTestCase.
     180    A class we look up as part of the LookupsTests.
    181181    """
    182182
    183183    def reallySet(self):
    class Summer(object): 
    187187
    188188
    189189
    190 class LookupsTestCase(TestCase):
     190class LookupsTests(TestCase):
    191191    """
    192192    Tests for L{namedClass}, L{namedModule}, and L{namedAny}.
    193193    """
    class NoClassAttr(Breakable): 
    424424
    425425
    426426
    427 class SafeRepr(TestCase):
     427class SafeReprTests(TestCase):
    428428    """
    429429    Tests for L{reflect.safe_repr} function.
    430430    """
    class SafeRepr(TestCase): 
    521521
    522522
    523523
    524 class SafeStr(TestCase):
     524class SafeStrTests(TestCase):
    525525    """
    526526    Tests for L{reflect.safe_str} function.
    527527    """
    class SafeStr(TestCase): 
    632632
    633633
    634634
    635 class FilenameToModule(TestCase):
     635class FilenameToModuleTests(TestCase):
    636636    """
    637637    Test L{filenameToModuleName} detection.
    638638    """
    class FullyQualifiedNameTests(TestCase): 
    750750            "%s.%s.test_unboundMethod" % (__name__, self.__class__.__name__))
    751751
    752752
    753 class ObjectGrep(unittest.TestCase):
     753class ObjectGrepTests(unittest.TestCase):
    754754    if _PY3:
    755755        # This is to be removed when fixing #6986
    756756        skip = "twisted.python.reflect.objgrep hasn't been ported to Python 3"
    class ObjectGrep(unittest.TestCase): 
    872872        self.assertIn("[1]", reflect.objgrep(D, o, reflect.isSame))
    873873
    874874
    875 class GetClass(unittest.TestCase):
     875class GetClassTests(unittest.TestCase):
    876876    if _PY3:
    877877        oldClassNames = ['type']
    878878    else:
    if not _PY3: 
    899899    # (hence the condition above) and will be removed as soon as no project used
    900900    # by Twisted will depend on these functions. Also, have a look at the
    901901    # comments related to those functions in twisted.python.reflect.
    902     class DeprecationTestCase(unittest.TestCase):
     902    class DeprecationTests(unittest.TestCase):
    903903        """
    904904        Test deprecations in twisted.python.reflect
    905905        """
    if not _PY3: 
    910910            """
    911911            self.callDeprecated(
    912912                (Version("Twisted", 11, 0, 0), "inspect.getmro"),
    913                 reflect.allYourBase, DeprecationTestCase)
     913                reflect.allYourBase, DeprecationTests)
    914914
    915915
    916916        def test_accumulateBases(self):
    if not _PY3: 
    920920            l = []
    921921            self.callDeprecated(
    922922                (Version("Twisted", 11, 0, 0), "inspect.getmro"),
    923                 reflect.accumulateBases, DeprecationTestCase, l, None)
     923                reflect.accumulateBases, DeprecationTests, l, None)
    924924
    925925
    926926        def test_getcurrent(self):
  • twisted/test/test_roots.py

    diff --git twisted/test/test_roots.py twisted/test/test_roots.py
    index c9fd39e..a73d86a 100644
    from twisted.trial import unittest 
    55from twisted.python import roots
    66import types
    77
    8 class RootsTest(unittest.TestCase):
     8class RootsTests(unittest.TestCase):
    99
    1010    def testExceptions(self):
    1111        request = roots.Request()
  • twisted/test/test_shortcut.py

    diff --git twisted/test/test_shortcut.py twisted/test/test_shortcut.py
    index dafd081..7ded805 100644
    if os.name == 'nt': 
    1414                                "available in the absence of win32com.")
    1515    import os.path
    1616
    17     class ShortcutTest(unittest.TestCase):
     17    class ShortcutTests(unittest.TestCase):
    1818        def testCreate(self):
    1919            s1=shortcut.Shortcut("test_shortcut.py")
    2020            tempname=self.mktemp() + '.lnk'
    if os.name == 'nt': 
    2222            self.assert_(os.path.exists(tempname))
    2323            sc=shortcut.open(tempname)
    2424            self.assert_(sc.GetPath(0)[0].endswith('test_shortcut.py'))
    25     ShortcutTest.skip = skipWindowsNopywin32
     25    ShortcutTests.skip = skipWindowsNopywin32
  • twisted/test/test_sip.py

    diff --git twisted/test/test_sip.py twisted/test/test_sip.py
    index 73894cc..b2c895c 100644
    class TestRealm: 
    106106    def requestAvatar(self, avatarId, mind, *interfaces):
    107107        return sip.IContact, None, lambda: None
    108108
    109 class MessageParsingTestCase(unittest.TestCase):
     109class MessageParsingTests(unittest.TestCase):
    110110    def setUp(self):
    111111        self.l = []
    112112        self.parser = sip.MessagesParser(self.l.append)
    class MessageParsingTestCase(unittest.TestCase): 
    218218
    219219
    220220
    221 class MessageParsingTestCase2(MessageParsingTestCase):
     221class MessageParsingFeedDataCharByCharTests(MessageParsingTests):
    222222    """Same as base class, but feed data char by char."""
    223223
    224224    def feedMessage(self, message):
    class MessageParsingTestCase2(MessageParsingTestCase): 
    227227        self.parser.dataDone()
    228228
    229229
    230 class MakeMessageTestCase(unittest.TestCase):
     230class MakeMessageTests(unittest.TestCase):
    231231
    232232    def testRequest(self):
    233233        r = sip.Request("INVITE", "sip:foo")
    class MakeMessageTestCase(unittest.TestCase): 
    250250        self.assertEqual(r.toString(), "SIP/2.0 200 OK\r\n\r\n")
    251251
    252252
    253 class ViaTestCase(unittest.TestCase):
     253class ViaTests(unittest.TestCase):
    254254
    255255    def checkRoundtrip(self, v):
    256256        s = v.toString()
    class ViaTestCase(unittest.TestCase): 
    377377
    378378
    379379
    380 class URLTestCase(unittest.TestCase):
     380class URLTests(unittest.TestCase):
    381381
    382382    def testRoundtrip(self):
    383383        for url in [
    class URLTestCase(unittest.TestCase): 
    401401            self.assertEqual(getattr(url, k), v)
    402402
    403403
    404 class ParseTestCase(unittest.TestCase):
     404class ParseTests(unittest.TestCase):
    405405
    406406    def testParseAddress(self):
    407407        for address, name, urls, params in [
    class FailingLocator: 
    430430        return defer.fail(LookupError())
    431431
    432432
    433 class ProxyTestCase(unittest.TestCase):
     433class ProxyTests(unittest.TestCase):
    434434
    435435    def setUp(self):
    436436        self.proxy = sip.Proxy("127.0.0.1")
    class ProxyTestCase(unittest.TestCase): 
    536536    #testCantForwardResponse.skip = "not implemented yet"
    537537
    538538
    539 class RegistrationTestCase(unittest.TestCase):
     539class RegistrationTests(unittest.TestCase):
    540540
    541541    def setUp(self):
    542542        self.proxy = sip.RegisterProxy(host="127.0.0.1")
    class Client(sip.Base): 
    724724        self.deferred.callback(self.received)
    725725
    726726
    727 class LiveTest(unittest.TestCase):
     727class LiveTests(unittest.TestCase):
    728728
    729729    def setUp(self):
    730730        self.proxy = sip.RegisterProxy(host="127.0.0.1")
    class FakeRegistry(sip.InMemoryRegistry): 
    882882            self, domainURL, logicalURL, physicalURL)
    883883        return d.addCallback(self._cbReg)
    884884
    885 class AuthorizationTestCase(unittest.TestCase):
     885class AuthorizationTests(unittest.TestCase):
    886886    def setUp(self):
    887887        self.proxy = sip.RegisterProxy(host="intarweb.us")
    888888        self.proxy.authorizers = self.proxy.authorizers.copy()
  • twisted/test/test_sob.py

    diff --git twisted/test/test_sob.py twisted/test/test_sob.py
    index 76c33a8..ac8c9b8 100644
    objects = [ 
    2727class FakeModule(object):
    2828    pass
    2929
    30 class PersistTestCase(unittest.TestCase):
     30class PersistTests(unittest.TestCase):
    3131    def testStyles(self):
    3232        for o in objects:
    3333            p = sob.Persistent(o, '')
  • twisted/test/test_socks.py

    diff --git twisted/test/test_socks.py twisted/test/test_socks.py
    index af0fc85..624ac19 100644
    class SOCKSv4Driver(socks.SOCKSv4): 
    8181
    8282
    8383
    84 class Connect(unittest.TestCase):
     84class ConnectTests(unittest.TestCase):
    8585    """
    8686    Tests for SOCKS and SOCKSv4a connect requests using the L{SOCKSv4} protocol.
    8787    """
    class Connect(unittest.TestCase): 
    251251
    252252
    253253
    254 class Bind(unittest.TestCase):
     254class BindTests(unittest.TestCase):
    255255    """
    256256    Tests for SOCKS and SOCKSv4a bind requests using the L{SOCKSv4} protocol.
    257257    """
  • twisted/test/test_ssl.py

    diff --git twisted/test/test_ssl.py twisted/test/test_ssl.py
    index 8cc4a56..09c4337 100644
    if SSL is not None: 
    272272
    273273
    274274
    275 class StolenTCPTestCase(ProperlyCloseFilesMixin, unittest.TestCase):
     275class StolenTCPTests(ProperlyCloseFilesMixin, unittest.TestCase):
    276276    """
    277277    For SSL transports, test many of the same things which are tested for
    278278    TCP transports.
    class StolenTCPTestCase(ProperlyCloseFilesMixin, unittest.TestCase): 
    335335
    336336
    337337
    338 class TLSTestCase(unittest.TestCase):
     338class TLSTests(unittest.TestCase):
    339339    """
    340340    Tests for startTLS support.
    341341
    class TLSTestCase(unittest.TestCase): 
    440440
    441441
    442442
    443 class SpammyTLSTestCase(TLSTestCase):
     443class SpammyTLSTests(TLSTests):
    444444    """
    445445    Test TLS features with bytes sitting in the out buffer.
    446446    """
    class SpammyTLSTestCase(TLSTestCase): 
    448448
    449449
    450450
    451 class BufferingTestCase(unittest.TestCase):
     451class BufferingTests(unittest.TestCase):
    452452    serverProto = None
    453453    clientProto = None
    454454
    class BufferingTestCase(unittest.TestCase): 
    483483
    484484
    485485
    486 class ConnectionLostTestCase(unittest.TestCase, ContextGeneratingMixin):
     486class ConnectionLostTests(unittest.TestCase, ContextGeneratingMixin):
    487487    """
    488488    SSL connection closing tests.
    489489    """
    class ClientContextFactoryTests(unittest.TestCase): 
    718718
    719719
    720720if interfaces.IReactorSSL(reactor, None) is None:
    721     for tCase in [StolenTCPTestCase, TLSTestCase, SpammyTLSTestCase,
    722                   BufferingTestCase, ConnectionLostTestCase,
     721    for tCase in [StolenTCPTests, TLSTests, SpammyTLSTests,
     722                  BufferingTests, ConnectionLostTests,
    723723                  DefaultOpenSSLContextFactoryTests,
    724724                  ClientContextFactoryTests]:
    725725        tCase.skip = "Reactor does not support SSL, cannot run SSL tests"
  • twisted/test/test_sslverify.py

    diff --git twisted/test/test_sslverify.py twisted/test/test_sslverify.py
    index ca534dc..89617bd 100644
    class FakeContext(object): 
    378378
    379379
    380380
    381 class ClientOptions(unittest.SynchronousTestCase):
     381class ClientOptionsTests(unittest.SynchronousTestCase):
    382382    """
    383383    Tests for L{sslverify.optionsForClientTLS}.
    384384    """
    class ClientOptions(unittest.SynchronousTestCase): 
    420420
    421421
    422422
    423 class OpenSSLOptions(unittest.TestCase):
     423class OpenSSLOptionsTests(unittest.TestCase):
    424424    if skipSSL:
    425425        skip = skipSSL
    426426
    class _ActualSSLTransport: 
    17491749
    17501750
    17511751
    1752 class Constructors(unittest.TestCase):
     1752class ConstructorsTests(unittest.TestCase):
    17531753    if skipSSL:
    17541754        skip = skipSSL
    17551755
    class Constructors(unittest.TestCase): 
    18201820
    18211821
    18221822
    1823 class TestOpenSSLCipher(unittest.TestCase):
     1823class OpenSSLCipherTests(unittest.TestCase):
    18241824    """
    18251825    Tests for twisted.internet._sslverify.OpenSSLCipher.
    18261826    """
    class TestOpenSSLCipher(unittest.TestCase): 
    18741874
    18751875
    18761876
    1877 class TestExpandCipherString(unittest.TestCase):
     1877class ExpandCipherStringTests(unittest.TestCase):
    18781878    """
    18791879    Tests for twisted.internet._sslverify._expandCipherString.
    18801880    """
    class TestExpandCipherString(unittest.TestCase): 
    19251925
    19261926
    19271927
    1928 class TestAcceptableCiphers(unittest.TestCase):
     1928class AcceptableCiphersTests(unittest.TestCase):
    19291929    """
    19301930    Tests for twisted.internet._sslverify.OpenSSLAcceptableCiphers.
    19311931    """
    class TestAcceptableCiphers(unittest.TestCase): 
    19661966
    19671967
    19681968
    1969 class TestDiffieHellmanParameters(unittest.TestCase):
     1969class DiffieHellmanParametersTests(unittest.TestCase):
    19701970    """
    19711971    Tests for twisted.internet._sslverify.OpenSSLDHParameters.
    19721972    """
    class FakeLib(object): 
    20782078
    20792079
    20802080
    2081 class TestFakeLib(unittest.TestCase):
     2081class FakeLibTests(unittest.TestCase):
    20822082    """
    20832083    Tests for FakeLib
    20842084    """
    class FakeBinding(object): 
    21512151
    21522152
    21532153
    2154 class TestECCurve(unittest.TestCase):
     2154class ECCurveTests(unittest.TestCase):
    21552155    """
    21562156    Tests for twisted.internet._sslverify.OpenSSLECCurve.
    21572157    """
    class TestECCurve(unittest.TestCase): 
    22362236
    22372237
    22382238
    2239 class KeyPair(unittest.TestCase):
     2239class KeyPairTests(unittest.TestCase):
    22402240    """
    22412241    Tests for L{sslverify.KeyPair}.
    22422242    """
  • twisted/test/test_stateful.py

    diff --git twisted/test/test_stateful.py twisted/test/test_stateful.py
    index ce72474..85d5a65 100644
    class TestInt32(MyInt32StringReceiver): 
    6565        self.closed = 1
    6666
    6767
    68 class Int32TestCase(TestCase, test_basic.IntNTestCaseMixin):
     68class Int32Tests(TestCase, test_basic.IntNTestCaseMixin):
    6969    protocol = TestInt32
    7070    strings = ["a", "b" * 16]
    7171    illegalStrings = ["\x10\x00\x00\x00aaaaaa"]
  • twisted/test/test_stdio.py

    diff --git twisted/test/test_stdio.py twisted/test/test_stdio.py
    index 14371a0..f88b1a0 100644
    class StandardIOTestProcessProtocol(protocol.ProcessProtocol): 
    7575
    7676
    7777
    78 class StandardInputOutputTestCase(unittest.TestCase):
     78class StandardInputOutputTests(unittest.TestCase):
    7979
    8080    skip = skipWindowsNopywin32
    8181
  • twisted/test/test_strcred.py

    diff --git twisted/test/test_strcred.py twisted/test/test_strcred.py
    index 9154c85..e0e044f 100644
    def getInvalidAuthType(): 
    4646
    4747
    4848
    49 class TestPublicAPI(unittest.TestCase):
     49class PublicAPITests(unittest.TestCase):
    5050
    5151    def test_emptyDescription(self):
    5252        """
    class TestPublicAPI(unittest.TestCase): 
    6969
    7070
    7171
    72 class TestStrcredFunctions(unittest.TestCase):
     72class StrcredFunctionsTests(unittest.TestCase):
    7373
    7474    def test_findCheckerFactories(self):
    7575        """
    class TestStrcredFunctions(unittest.TestCase): 
    9090
    9191
    9292
    93 class TestMemoryChecker(unittest.TestCase):
     93class MemoryCheckerTests(unittest.TestCase):
    9494
    9595    def setUp(self):
    9696        self.admin = credentials.UsernamePassword('admin', 'asdf')
    class TestMemoryChecker(unittest.TestCase): 
    147147
    148148
    149149
    150 class TestAnonymousChecker(unittest.TestCase):
     150class AnonymousCheckerTests(unittest.TestCase):
    151151
    152152    def test_isChecker(self):
    153153        """
    class TestAnonymousChecker(unittest.TestCase): 
    171171
    172172
    173173
    174 class TestUnixChecker(unittest.TestCase):
     174class UnixCheckerTests(unittest.TestCase):
    175175    users = {
    176176        'admin': 'asdf',
    177177        'alice': 'foo',
    class TestUnixChecker(unittest.TestCase): 
    259259
    260260
    261261
    262 class TestFileDBChecker(unittest.TestCase):
     262class FileDBCheckerTests(unittest.TestCase):
    263263    """
    264264    Test for the --auth=file:... file checker.
    265265    """
    class TestFileDBChecker(unittest.TestCase): 
    340340
    341341
    342342
    343 class TestSSHChecker(unittest.TestCase):
     343class SSHCheckerTests(unittest.TestCase):
    344344    """
    345345    Tests for the --auth=sshkey:... checker.  The majority of the tests for the
    346346    ssh public key database checker are in
    class DummyOptions(usage.Options, strcred.AuthOptionMixin): 
    375375
    376376
    377377
    378 class TestCheckerOptions(unittest.TestCase):
     378class CheckerOptionsTests(unittest.TestCase):
    379379
    380380    def test_createsList(self):
    381381        """
    class OptionsSupportsNoInterfaces(usage.Options, strcred.AuthOptionMixin): 
    512512
    513513
    514514
    515 class TestLimitingInterfaces(unittest.TestCase):
     515class LimitingInterfacesTests(unittest.TestCase):
    516516    """
    517517    Tests functionality that allows an application to limit the
    518518    credential interfaces it can support. For the purposes of this
  • twisted/test/test_strerror.py

    diff --git twisted/test/test_strerror.py twisted/test/test_strerror.py
    index ce14051..41667d2 100644
    class _MyWindowsException(OSError): 
    2121
    2222
    2323
    24 class ErrorFormatingTestCase(TestCase):
     24class ErrorFormatingTests(TestCase):
    2525    """
    2626    Tests for C{_ErrorFormatter.formatError}.
    2727    """
  • twisted/test/test_strports.py

    diff --git twisted/test/test_strports.py twisted/test/test_strports.py
    index aabe73e..08e508e 100644
    from twisted.internet.endpoints import TCP4ServerEndpoint, UNIXServerEndpoint 
    1414
    1515
    1616
    17 class DeprecatedParseTestCase(ParserTests):
     17class DeprecatedParseTests(ParserTests):
    1818    """
    1919    L{strports.parse} is deprecated.  It's an alias for a method that is now
    2020    private in L{twisted.internet.endpoints}.
    class DeprecatedParseTestCase(ParserTests): 
    4949
    5050
    5151
    52 class ServiceTestCase(TestCase):
     52class ServiceTests(TestCase):
    5353    """
    5454    Tests for L{strports.service}.
    5555    """
  • twisted/test/test_task.py

    diff --git twisted/test/test_task.py twisted/test/test_task.py
    index bd35545..e5b8bd1 100644
    class TestException(Exception): 
    3131
    3232
    3333
    34 class ClockTestCase(unittest.TestCase):
     34class ClockTests(unittest.TestCase):
    3535    """
    3636    Test the non-wallclock based clock implementation.
    3737    """
    class ClockTestCase(unittest.TestCase): 
    251251
    252252
    253253
    254 class LoopTestCase(unittest.TestCase):
     254class LoopTests(unittest.TestCase):
    255255    """
    256256    Tests for L{task.LoopingCall} based on a fake L{IReactorTime}
    257257    implementation.
    class LoopTestCase(unittest.TestCase): 
    565565
    566566
    567567
    568 class ReactorLoopTestCase(unittest.TestCase):
     568class ReactorLoopTests(unittest.TestCase):
    569569    # Slightly inferior tests which exercise interactions with an actual
    570570    # reactor.
    571571    def testFailure(self):
  • twisted/test/test_tcp.py

    diff --git twisted/test/test_tcp.py twisted/test/test_tcp.py
    index bce885d..e381209 100644
    class MyClientFactory(MyProtocolFactoryMixin, protocol.ClientFactory): 
    170170
    171171
    172172
    173 class ListeningTestCase(unittest.TestCase):
     173class ListeningTests(unittest.TestCase):
    174174
    175175    def test_listen(self):
    176176        """
    class ListeningTestCase(unittest.TestCase): 
    369369
    370370
    371371
    372 class LoopbackTestCase(unittest.TestCase):
     372class LoopbackTests(unittest.TestCase):
    373373    """
    374374    Test loopback connections.
    375375    """
    class ClientStartStopFactory(MyClientFactory): 
    617617        self.whenStopped.callback(True)
    618618
    619619
    620 class FactoryTestCase(unittest.TestCase):
     620class FactoryTests(unittest.TestCase):
    621621    """Tests for factories."""
    622622
    623623    def test_serverStartStop(self):
    class FactoryTestCase(unittest.TestCase): 
    681681
    682682
    683683
    684 class CannotBindTestCase(unittest.TestCase):
     684class CannotBindTests(unittest.TestCase):
    685685    """
    686686    Tests for correct behavior when a reactor cannot bind to the required TCP
    687687    port.
    class MyOtherClientFactory(protocol.ClientFactory): 
    798798
    799799
    800800
    801 class LocalRemoteAddressTestCase(unittest.TestCase):
     801class LocalRemoteAddressTests(unittest.TestCase):
    802802    """
    803803    Tests for correct getHost/getPeer values and that the correct address is
    804804    passed to buildProtocol.
    class WriterClientFactory(protocol.ClientFactory): 
    875875        self.protocol = p
    876876        return p
    877877
    878 class WriteDataTestCase(unittest.TestCase):
     878class WriteDataTests(unittest.TestCase):
    879879    """
    880880    Test that connected TCP sockets can actually write data. Try to exercise
    881881    the entire ITransport interface.
    class ProperlyCloseFilesMixin: 
    12191219
    12201220
    12211221
    1222 class ProperlyCloseFilesTestCase(unittest.TestCase, ProperlyCloseFilesMixin):
     1222class ProperlyCloseFilesTests(unittest.TestCase, ProperlyCloseFilesMixin):
    12231223    """
    12241224    Test that the sockets created by L{IReactorTCP.connectTCP} are cleaned up
    12251225    when the connection they are associated with is closed.
    class WiredFactory(policies.WrappingFactory): 
    12721272
    12731273
    12741274
    1275 class AddressTestCase(unittest.TestCase):
     1275class AddressTests(unittest.TestCase):
    12761276    """
    12771277    Tests for address-related interactions with client and server protocols.
    12781278    """
    class FireOnCloseFactory(policies.WrappingFactory): 
    14091409        self.deferred = defer.Deferred()
    14101410
    14111411
    1412 class LargeBufferTestCase(unittest.TestCase):
     1412class LargeBufferTests(unittest.TestCase):
    14131413    """Test that buffering large amounts of data works.
    14141414    """
    14151415
    class MyHCFactory(protocol.ServerFactory): 
    14721472        return p
    14731473
    14741474
    1475 class HalfCloseTestCase(unittest.TestCase):
     1475class HalfCloseTests(unittest.TestCase):
    14761476    """Test half-closing connections."""
    14771477
    14781478    def setUp(self):
    class HalfCloseTestCase(unittest.TestCase): 
    15541554        return d
    15551555
    15561556
    1557 class HalfClose2TestCase(unittest.TestCase):
     1557class HalfCloseNoNotificationAndShutdownExceptionTests(unittest.TestCase):
    15581558
    15591559    def setUp(self):
    15601560        self.f = f = MyServerFactory()
    class HalfCloseBuggyApplicationTests(unittest.TestCase): 
    16781678
    16791679
    16801680
    1681 class LogTestCase(unittest.TestCase):
     1681class LogTests(unittest.TestCase):
    16821682    """
    16831683    Test logging facility of TCP base classes.
    16841684    """
    class LogTestCase(unittest.TestCase): 
    17121712
    17131713
    17141714
    1715 class PauseProducingTestCase(unittest.TestCase):
     1715class PauseProducingTests(unittest.TestCase):
    17161716    """
    17171717    Test some behaviors of pausing the production of a transport.
    17181718    """
    class PauseProducingTestCase(unittest.TestCase): 
    17591759
    17601760
    17611761
    1762 class CallBackOrderTestCase(unittest.TestCase):
     1762class CallBackOrderTests(unittest.TestCase):
    17631763    """
    17641764    Test the order of reactor callbacks
    17651765    """
    except ImportError: 
    18211821    pass
    18221822else:
    18231823    numRounds = resource.getrlimit(resource.RLIMIT_NOFILE)[0] + 10
    1824     ProperlyCloseFilesTestCase.numberRounds = numRounds
     1824    ProperlyCloseFilesTests.numberRounds = numRounds
  • twisted/test/test_tcp_internals.py

    diff --git twisted/test/test_tcp_internals.py twisted/test/test_tcp_internals.py
    index be4a77f..08a402d 100644
    from twisted.internet.defer import maybeDeferred, gatherResults 
    2525from twisted.internet import reactor, interfaces
    2626
    2727
    28 class PlatformAssumptionsTestCase(TestCase):
     28class PlatformAssumptionsTests(TestCase):
    2929    """
    3030    Test assumptions about platform behaviors.
    3131    """
    class PlatformAssumptionsTestCase(TestCase): 
    117117
    118118
    119119
    120 class SelectReactorTestCase(TestCase):
     120class SelectReactorTests(TestCase):
    121121    """
    122122    Tests for select-specific failure conditions.
    123123    """
    class SelectReactorTestCase(TestCase): 
    250250
    251251if not interfaces.IReactorFDSet.providedBy(reactor):
    252252    skipMsg = 'This test only applies to reactors that implement IReactorFDset'
    253     PlatformAssumptionsTestCase.skip = skipMsg
    254     SelectReactorTestCase.skip = skipMsg
     253    PlatformAssumptionsTests.skip = skipMsg
     254    SelectReactorTests.skip = skipMsg
    255255
  • twisted/test/test_text.py

    diff --git twisted/test/test_text.py twisted/test/test_text.py
    index 4b2d38c..7a0e914 100644
    science. 
    2323"""
    2424
    2525
    26 class WrapTest(unittest.TestCase):
     26class WrapTests(unittest.TestCase):
    2727    """
    2828    Tests for L{text.greedyWrap}.
    2929    """
    class WrapTest(unittest.TestCase): 
    8383
    8484
    8585
    86 class LineTest(unittest.TestCase):
     86class LineTests(unittest.TestCase):
    8787    """
    8888    Tests for L{isMultiline} and L{endsInNewline}.
    8989    """
    class LineTest(unittest.TestCase): 
    114114
    115115
    116116
    117 class StringyStringTest(unittest.TestCase):
     117class StringyStringTests(unittest.TestCase):
    118118    """
    119119    Tests for L{text.stringyString}.
    120120    """
    class StringyStringTest(unittest.TestCase): 
    146146
    147147
    148148
    149 class SplitTest(unittest.TestCase):
     149class SplitTests(unittest.TestCase):
    150150    """
    151151    Tests for L{text.splitQuoted}.
    152152    """
    class SplitTest(unittest.TestCase): 
    179179
    180180
    181181
    182 class StrFileTest(unittest.TestCase):
     182class StrFileTests(unittest.TestCase):
    183183    def setUp(self):
    184184        self.io = StringIO("this is a test string")
    185185
  • twisted/test/test_threadable.py

    diff --git twisted/test/test_threadable.py twisted/test/test_threadable.py
    index 502aa85..5be5638 100644
    class TestObject: 
    3535
    3636threadable.synchronize(TestObject)
    3737
    38 class SynchronizationTestCase(unittest.SynchronousTestCase):
     38class SynchronizationTests(unittest.SynchronousTestCase):
    3939    def setUp(self):
    4040        """
    4141        Reduce the CPython check interval so that thread switches happen much
    class SynchronizationTestCase(unittest.SynchronousTestCase): 
    113113
    114114
    115115
    116 class SerializationTestCase(unittest.SynchronousTestCase):
     116class SerializationTests(unittest.SynchronousTestCase):
    117117    def testPickling(self):
    118118        lock = threadable.XLock()
    119119        lockType = type(lock)
  • twisted/test/test_threadpool.py

    diff --git twisted/test/test_threadpool.py twisted/test/test_threadpool.py
    index 8958830..fa871d0 100644
    threadable.synchronize(Synchronization) 
    5656
    5757
    5858
    59 class ThreadPoolTestCase(unittest.SynchronousTestCase):
     59class ThreadPoolTests(unittest.SynchronousTestCase):
    6060    """
    6161    Test threadpools.
    6262    """
    class ThreadPoolTestCase(unittest.SynchronousTestCase): 
    556556
    557557
    558558
    559 class RaceConditionTestCase(unittest.SynchronousTestCase):
     559class RaceConditionTests(unittest.SynchronousTestCase):
    560560
    561561    def getTimeout(self):
    562562        """
  • twisted/test/test_threads.py

    diff --git twisted/test/test_threads.py twisted/test/test_threads.py
    index 69ee19d..9ebf40f 100644
    if _PY3: 
    2020    xrange = range
    2121
    2222
    23 class ReactorThreadsTestCase(unittest.TestCase):
     23class ReactorThreadsTests(unittest.TestCase):
    2424    """
    2525    Tests for the reactor threading API.
    2626    """
    class Counter: 
    212212
    213213
    214214
    215 class DeferredResultTestCase(unittest.TestCase):
     215class DeferredResultTests(unittest.TestCase):
    216216    """
    217217    Test twisted.internet.threads.
    218218    """
    class DeferredResultTestCase(unittest.TestCase): 
    288288
    289289
    290290
    291 class DeferToThreadPoolTestCase(unittest.TestCase):
     291class DeferToThreadPoolTests(unittest.TestCase):
    292292    """
    293293    Test L{twisted.internet.threads.deferToThreadPool}.
    294294    """
    class ThreadStartupProcessProtocol(protocol.ProcessProtocol): 
    364364
    365365
    366366
    367 class StartupBehaviorTestCase(unittest.TestCase):
     367class StartupBehaviorTests(unittest.TestCase):
    368368    """
    369369    Test cases for the behavior of the reactor threadpool near startup
    370370    boundary conditions.
    class StartupBehaviorTestCase(unittest.TestCase): 
    409409
    410410
    411411if interfaces.IReactorThreads(reactor, None) is None:
    412     for cls in (ReactorThreadsTestCase,
    413                 DeferredResultTestCase,
    414                 StartupBehaviorTestCase):
     412    for cls in (ReactorThreadsTests,
     413                DeferredResultTests,
     414                StartupBehaviorTests):
    415415        cls.skip = "No thread support, nothing to test here."
    416416else:
    417417    import threading
    418418
    419419if interfaces.IReactorProcess(reactor, None) is None:
    420     for cls in (StartupBehaviorTestCase,):
     420    for cls in (StartupBehaviorTests,):
    421421        cls.skip = "No process support, cannot run subprocess thread tests."
  • twisted/test/test_tpfile.py

    diff --git twisted/test/test_tpfile.py twisted/test/test_tpfile.py
    index 655a166..bba107e 100644
    class FileSendingClient(protocol.Protocol): 
    2424        d = s.beginFileTransfer(self.f, self.transport, lambda x: x)
    2525        d.addCallback(lambda r: self.transport.loseConnection())
    2626
    27 class FileSenderTestCase(unittest.TestCase):
     27class FileSenderTests(unittest.TestCase):
    2828    def testSendingFile(self):
    2929        testStr = 'xyz' * 100 + 'abc' * 100 + '123' * 100
    3030        s = BufferingServer()
  • twisted/test/test_twistd.py

    diff --git twisted/test/test_twistd.py twisted/test/test_twistd.py
    index 934658b..9253e88 100644
    class CrippledApplicationRunner(twistd._SomeApplicationRunner): 
    172172
    173173
    174174
    175 class ServerOptionsTest(unittest.TestCase):
     175class ServerOptionsTests(unittest.TestCase):
    176176    """
    177177    Non-platform-specific tests for the pltaform-specific ServerOptions class.
    178178    """
    class ServerOptionsTest(unittest.TestCase): 
    355355
    356356
    357357
    358 class TapFileTest(unittest.TestCase):
     358class TapFileTests(unittest.TestCase):
    359359    """
    360360    Test twistd-related functionality that requires a tap file on disk.
    361361    """
    class TestApplicationRunner(app.ApplicationRunner): 
    431431
    432432
    433433
    434 class ApplicationRunnerTest(unittest.TestCase):
     434class ApplicationRunnerTests(unittest.TestCase):
    435435    """
    436436    Non-platform-specific tests for the platform-specific ApplicationRunner.
    437437    """
    class UnixApplicationRunnerStartApplicationTests(unittest.TestCase): 
    793793
    794794
    795795
    796 class UnixApplicationRunnerRemovePID(unittest.TestCase):
     796class UnixApplicationRunnerRemovePIDTests(unittest.TestCase):
    797797    """
    798798    Tests for L{UnixApplicationRunner.removePID}.
    799799    """
    class DummyReactor(object): 
    889889
    890890
    891891
    892 class AppProfilingTestCase(unittest.TestCase):
     892class AppProfilingTests(unittest.TestCase):
    893893    """
    894894    Tests for L{app.AppProfiler}.
    895895    """
    def _setupSyslog(testCase): 
    12181218
    12191219
    12201220
    1221 class AppLoggerTestCase(unittest.TestCase):
     1221class AppLoggerTests(unittest.TestCase):
    12221222    """
    12231223    Tests for L{app.AppLogger}.
    12241224
    class AppLoggerTestCase(unittest.TestCase): 
    14231423
    14241424
    14251425
    1426 class UnixAppLoggerTestCase(unittest.TestCase):
     1426class UnixAppLoggerTests(unittest.TestCase):
    14271427    """
    14281428    Tests for L{UnixAppLogger}.
    14291429
  • twisted/test/test_udp.py

    diff --git twisted/test/test_udp.py twisted/test/test_udp.py
    index 447889e..6cf4583 100644
    class BadClient(protocol.DatagramProtocol): 
    114114
    115115
    116116
    117 class UDPTestCase(unittest.TestCase):
     117class UDPTests(unittest.TestCase):
    118118
    119119    def test_oldAddress(self):
    120120        """
    class UDPTestCase(unittest.TestCase): 
    451451
    452452
    453453
    454 class ReactorShutdownInteraction(unittest.TestCase):
     454class ReactorShutdownInteractionTests(unittest.TestCase):
    455455    """Test reactor shutdown interaction"""
    456456
    457457    def setUp(self):
    class ReactorShutdownInteraction(unittest.TestCase): 
    500500
    501501
    502502
    503 class MulticastTestCase(unittest.TestCase):
     503class MulticastTests(unittest.TestCase):
    504504
    505505    def setUp(self):
    506506        self.server = Server()
    class MulticastTestCase(unittest.TestCase): 
    695695
    696696
    697697if not interfaces.IReactorUDP(reactor, None):
    698     UDPTestCase.skip = "This reactor does not support UDP"
    699     ReactorShutdownInteraction.skip = "This reactor does not support UDP"
     698    UDPTests.skip = "This reactor does not support UDP"
     699    ReactorShutdownInteractionTests.skip = "This reactor does not support UDP"
    700700if not interfaces.IReactorMulticast(reactor, None):
    701     MulticastTestCase.skip = "This reactor does not support multicast"
     701    MulticastTests.skip = "This reactor does not support multicast"
  • twisted/test/test_unix.py

    diff --git twisted/test/test_unix.py twisted/test/test_unix.py
    index d96e7b0..c2f39ab 100644
    class FailedConnectionClientFactory(protocol.ClientFactory): 
    2424
    2525
    2626
    27 class UnixSocketTestCase(unittest.TestCase):
     27class UnixSocketTests(unittest.TestCase):
    2828    """
    2929    Test unix sockets.
    3030    """
    class ServerProto(protocol.DatagramProtocol): 
    286286
    287287
    288288
    289 class DatagramUnixSocketTestCase(unittest.TestCase):
     289class DatagramUnixSocketTests(unittest.TestCase):
    290290    """
    291291    Test datagram UNIX sockets.
    292292    """
    class DatagramUnixSocketTestCase(unittest.TestCase): 
    400400
    401401
    402402if not interfaces.IReactorUNIX(reactor, None):
    403     UnixSocketTestCase.skip = "This reactor does not support UNIX domain sockets"
     403    UnixSocketTests.skip = "This reactor does not support UNIX domain sockets"
    404404if not interfaces.IReactorUNIXDatagram(reactor, None):
    405     DatagramUnixSocketTestCase.skip = "This reactor does not support UNIX datagram sockets"
     405    DatagramUnixSocketTests.skip = "This reactor does not support UNIX datagram sockets"
  • twisted/test/test_usage.py

    diff --git twisted/test/test_usage.py twisted/test/test_usage.py
    index be136e8..28f2091 100644
    class WellBehaved(usage.Options): 
    3636
    3737
    3838
    39 class ParseCorrectnessTest(unittest.TestCase):
     39class ParseCorrectnessTests(unittest.TestCase):
    4040    """
    4141    Test L{usage.Options.parseOptions} for correct values under
    4242    good conditions.
    class TypedOptions(usage.Options): 
    9797
    9898
    9999
    100 class TypedTestCase(unittest.TestCase):
     100class TypedTests(unittest.TestCase):
    101101    """
    102102    Test L{usage.Options.parseOptions} for options with forced types.
    103103    """
    class WeirdCallableOptions(usage.Options): 
    178178    ]
    179179
    180180
    181 class WrongTypedTestCase(unittest.TestCase):
     181class WrongTypedTests(unittest.TestCase):
    182182    """
    183183    Test L{usage.Options.parseOptions} for wrong coerce options.
    184184    """
    class WrongTypedTestCase(unittest.TestCase): 
    214214        self.assertRaises(RuntimeError, us.parseOptions, argV)
    215215
    216216
    217 class OutputTest(unittest.TestCase):
     217class OutputTests(unittest.TestCase):
    218218    def test_uppercasing(self):
    219219        """
    220220        Error output case adjustment does not mangle options
    class SubCommandOptions(usage.Options): 
    255255        ]
    256256
    257257
    258 class SubCommandTest(unittest.TestCase):
     258class SubCommandTests(unittest.TestCase):
    259259    """
    260260    Test L{usage.Options.parseOptions} for options with subcommands.
    261261    """
    class SubCommandTest(unittest.TestCase): 
    374374        self.failUnlessIdentical(oBar.subOptions.parent, oBar)
    375375
    376376
    377 class HelpStringTest(unittest.TestCase):
     377class HelpStringTests(unittest.TestCase):
    378378    """
    379379    Test generated help strings.
    380380    """
    class HelpStringTest(unittest.TestCase): 
    409409        self.failUnless(lines[0].find("flagallicious") >= 0)
    410410
    411411
    412 class PortCoerceTestCase(unittest.TestCase):
     412class PortCoerceTests(unittest.TestCase):
    413413    """
    414414    Test the behavior of L{usage.portCoerce}.
    415415    """
    class PortCoerceTestCase(unittest.TestCase): 
    432432
    433433
    434434
    435 class ZshCompleterTestCase(unittest.TestCase):
     435class ZshCompleterTests(unittest.TestCase):
    436436    """
    437437    Test the behavior of the various L{twisted.usage.Completer} classes
    438438    for producing output usable by zsh tab-completion system.
    class ZshCompleterTestCase(unittest.TestCase): 
    590590
    591591
    592592
    593 class CompleterNotImplementedTestCase(unittest.TestCase):
     593class CompleterNotImplementedTests(unittest.TestCase):
    594594    """
    595595    Using an unknown shell constant with the various Completer() classes
    596596    should raise NotImplementedError
    class CompleterNotImplementedTestCase(unittest.TestCase): 
    615615
    616616
    617617
    618 class FlagFunctionTest(unittest.TestCase):
     618class FlagFunctionTests(unittest.TestCase):
    619619    """
    620620    Tests for L{usage.flagFunction}.
    621621    """
    class FlagFunctionTest(unittest.TestCase): 
    684684
    685685
    686686
    687 class OptionsInternalTest(unittest.TestCase):
     687class OptionsInternalTests(unittest.TestCase):
    688688    """
    689689    Tests internal behavior of C{usage.Options}.
    690690    """