~ztk-steering-group/zope.testrunner/trunk

« back to all changes in this revision

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

  • Committer: mgedmin
  • Date: 2013-02-11 20:02:43 UTC
  • Revision ID: svn-v4:62d5b8a3-27da-0310-9561-8e5933582275:zope.testrunner/trunk:129304
Moved to github

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
##############################################################################
2
 
#
3
 
# Copyright (c) 2003 Zope Foundation and Contributors.
4
 
# All Rights Reserved.
5
 
#
6
 
# This software is subject to the provisions of the Zope Public License,
7
 
# Version 2.1 (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
 
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