~landscape/zope3/newer-from-ztk

« back to all changes in this revision

Viewing changes to src/zope/testing/testrunner/testrunner-ex/sample1/sampletests_ntd.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
 
"""Sample tests with a layer that can't be torn down
15
 
 
16
 
$Id: sampletests_ntd.py 33278 2005-07-12 11:45:54Z jim $
17
 
"""
18
 
 
19
 
import unittest
20
 
 
21
 
class Layer:
22
 
 
23
 
    def setUp(self):
24
 
        pass
25
 
    setUp = classmethod(setUp)
26
 
 
27
 
    def tearDown(self):
28
 
        raise NotImplementedError
29
 
    tearDown = classmethod(tearDown)
30
 
 
31
 
class TestSomething(unittest.TestCase):
32
 
 
33
 
    layer = Layer
34
 
 
35
 
    def test_something(self):
36
 
        pass
37
 
 
38
 
 
39
 
def test_suite():
40
 
    suite = unittest.TestSuite()
41
 
    suite.addTest(unittest.makeSuite(TestSomething))
42
 
    return suite
43
 
 
44
 
 
45
 
if __name__ == '__main__':
46
 
    unittest.main()