aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/mockcustomsuite3.py
blob: c5b89d47dd6005a08cb9d04f201628239bc2108b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details

"""
Mock test module that contains both a C{test_suite} and a C{testSuite} method.
L{runner.TestLoader} should load the tests from the C{testSuite}, not from the
C{Foo} C{TestCase} nor from the C{test_suite} method.

See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWithBothCustom}.
"""


from twisted.trial import unittest, runner

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


def test_suite():
    ts = runner.TestSuite()
    ts.name = "test_suite"
    return ts


def testSuite():
    ts = runner.TestSuite()
    ts.name = "testSuite"
    return ts