~landscape/zope3/ztk-1.1.3

« back to all changes in this revision

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

  • Committer: Thomas Hervé
  • Date: 2009-09-21 06:45:37 UTC
  • mfrom: (7.1.2 newer-zope-testing)
  • Revision ID: thomas@canonical.com-20090921064537-zcfyuv32hxj9eah0
Merge newer-zope-testing [a=sidnei] [f=429702] [r=therve,free.ekayanaka]

Update zope.testing to 3.8.1

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
    __traceback_info__ = "I don't know what Y should be."
 
25
    x = y + 1
 
26
    x = x + 1
 
27
 
 
28
 
 
29
def eek(self):
 
30
    """
 
31
    >>> f()
 
32
    1
 
33
    """
 
34
 
 
35
class Test(unittest.TestCase):
 
36
 
 
37
    def test1(self):
 
38
        pass
 
39
 
 
40
    def test2(self):
 
41
        pass
 
42
 
 
43
    def test3(self):
 
44
        f()
 
45
 
 
46
    def test4(self):
 
47
        pass
 
48
 
 
49
    def test5(self):
 
50
        pass
 
51
 
 
52
def test_suite():
 
53
    suite = unittest.TestSuite()
 
54
    suite.addTest(doctest.DocTestSuite())
 
55
    suite.addTest(unittest.makeSuite(Test))
 
56
    suite.addTest(doctest.DocFileSuite('e.txt'))
 
57
    return suite