~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/trial/test/mockcustomsuite.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

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{test_suite} method. L{runner.TestLoader}
 
5
should load the tests from the C{test_suite}, not from the C{Foo} C{TestCase}.
 
6
 
 
7
See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_test_suite}.
 
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 test_suite():
 
19
    ts = runner.TestSuite()
 
20
    ts.name = "MyCustomSuite"
 
21
    return ts