vendor/Five/1.2b-r20590

annotate testing/testrunner-ex/sample2/sampletests_ntd.py @ 0:3673ed425f80

Vendor import of Five 1.2b+ (r20590)
author fguillaume
date Fri, 02 Dec 2005 20:25:42 +0000
parents
children
rev   line source
fguillaume@0 1 ##############################################################################
fguillaume@0 2 #
fguillaume@0 3 # Copyright (c) 2003 Zope Corporation and Contributors.
fguillaume@0 4 # All Rights Reserved.
fguillaume@0 5 #
fguillaume@0 6 # This software is subject to the provisions of the Zope Public License,
fguillaume@0 7 # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
fguillaume@0 8 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
fguillaume@0 9 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
fguillaume@0 10 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
fguillaume@0 11 # FOR A PARTICULAR PURPOSE.
fguillaume@0 12 #
fguillaume@0 13 ##############################################################################
fguillaume@0 14 """Sample tests with a layer that can't be torn down
fguillaume@0 15
fguillaume@0 16 $Id: sampletests_ntd.py 18831 2005-10-21 18:07:37Z yuppie $
fguillaume@0 17 """
fguillaume@0 18
fguillaume@0 19 import unittest
fguillaume@0 20
fguillaume@0 21 class Layer:
fguillaume@0 22
fguillaume@0 23 def setUp(self):
fguillaume@0 24 pass
fguillaume@0 25 setUp = classmethod(setUp)
fguillaume@0 26
fguillaume@0 27 def tearDown(self):
fguillaume@0 28 raise NotImplementedError
fguillaume@0 29 tearDown = classmethod(tearDown)
fguillaume@0 30
fguillaume@0 31 class TestSomething(unittest.TestCase):
fguillaume@0 32
fguillaume@0 33 layer = Layer
fguillaume@0 34
fguillaume@0 35 def test_something(self):
fguillaume@0 36 pass
fguillaume@0 37
fguillaume@0 38
fguillaume@0 39 def test_suite():
fguillaume@0 40 suite = unittest.TestSuite()
fguillaume@0 41 suite.addTest(unittest.makeSuite(TestSomething))
fguillaume@0 42 return suite
fguillaume@0 43
fguillaume@0 44
fguillaume@0 45 if __name__ == '__main__':
fguillaume@0 46 unittest.main()