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

« back to all changes in this revision

Viewing changes to twisted/trial/test/mockcustomsuite3.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 both a C{test_suite} and a C{testSuite} method.
 
5
L{runner.TestLoader} should load the tests from the C{testSuite}, not from the
 
6
C{Foo} C{TestCase} nor from the C{test_suite} method.
 
7
 
 
8
See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWithBothCustom}.
 
9
"""
 
10
 
 
11
 
 
12
from twisted.trial import unittest, runner
 
13
 
 
14
class Foo(unittest.TestCase):
 
15
    def test_foo(self):
 
16
        pass
 
17
 
 
18
 
 
19
def test_suite():
 
20
    ts = runner.TestSuite()
 
21
    ts.name = "test_suite"
 
22
    return ts
 
23
 
 
24
 
 
25
def testSuite():
 
26
    ts = runner.TestSuite()
 
27
    ts.name = "testSuite"
 
28
    return ts