~justin-fathomdb/nova/justinsb-openstack-api-volumes

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/twisted/trial/test/mockcustomsuite2.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details
 
2
 
 
3
"""
 
4
Mock test module that contains a C{testSuite} method. L{runner.TestLoader}
 
5
should load the tests from the C{testSuite}, not from the C{Foo} C{TestCase}.
 
6
 
 
7
See L{twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_testSuite}.
 
8
"""
 
9
 
 
10
 
 
11
from twisted.trial import unittest, runner
 
12
 
 
13
class Foo(unittest.TestCase):
 
14
    def test_foo(self):
 
15
        pass
 
16
 
 
17
 
 
18
def testSuite():
 
19
    ts = runner.TestSuite()
 
20
    ts.name = "MyCustomSuite"
 
21
    return ts