~landscape/zope3/ztk-1.1.3

« back to all changes in this revision

Viewing changes to src/zope/testing/testrunner-ex/sample2/sampletests_e.py

  • Committer: Thomas Hervé
  • Date: 2009-09-21 16:46:07 UTC
  • Revision ID: thomas@canonical.com-20090921164607-sky3xhlt02ji80ka
Revert r8: regression with test failures

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##############################################################################
 
2
#
 
3
# Copyright (c) 2003 Zope Corporation and Contributors.
 
4
# All Rights Reserved.
 
5
#
 
6
# This software is subject to the provisions of the Zope Public License,
 
7
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 
11
# FOR A PARTICULAR PURPOSE.
 
12
#
 
13
##############################################################################
 
14
 
 
15
import unittest
 
16
from zope.testing import doctest
 
17
 
 
18
def f():
 
19
    g()
 
20
 
 
21
def g():
 
22
    x = 1
 
23
    x = x + 1
 
24
    x = y + 1
 
25
    x = x + 1
 
26
 
 
27
 
 
28
def eek(self):
 
29
    """
 
30
    >>> f()
 
31
    1
 
32
    """
 
33
 
 
34
class Test(unittest.TestCase):
 
35
 
 
36
    def test1(self):
 
37
        pass
 
38
 
 
39
    def test2(self):
 
40
        pass
 
41
 
 
42
    def test3(self):
 
43
        f()
 
44
 
 
45
    def test4(self):
 
46
        pass
 
47
 
 
48
    def test5(self):
 
49
        pass
 
50
 
 
51
def test_suite():
 
52
    suite = unittest.TestSuite()
 
53
    suite.addTest(doctest.DocTestSuite())
 
54
    suite.addTest(unittest.makeSuite(Test))
 
55
    suite.addTest(doctest.DocFileSuite('e.txt'))
 
56
    return suite