vendor/Five/1.2b-r20590

diff 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
line diff
     1.1 new file mode 100644
     1.2 --- /dev/null
     1.3 +++ b/testing/testrunner-ex/sample2/sampletests_ntd.py
     1.4 @@ -0,0 +1,46 @@
     1.5 +##############################################################################
     1.6 +#
     1.7 +# Copyright (c) 2003 Zope Corporation and Contributors.
     1.8 +# All Rights Reserved.
     1.9 +#
    1.10 +# This software is subject to the provisions of the Zope Public License,
    1.11 +# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
    1.12 +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
    1.13 +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    1.14 +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
    1.15 +# FOR A PARTICULAR PURPOSE.
    1.16 +#
    1.17 +##############################################################################
    1.18 +"""Sample tests with a layer that can't be torn down
    1.19 +
    1.20 +$Id: sampletests_ntd.py 18831 2005-10-21 18:07:37Z yuppie $
    1.21 +"""
    1.22 +
    1.23 +import unittest
    1.24 +
    1.25 +class Layer:
    1.26 +
    1.27 +    def setUp(self):
    1.28 +        pass
    1.29 +    setUp = classmethod(setUp)
    1.30 +
    1.31 +    def tearDown(self):
    1.32 +        raise NotImplementedError
    1.33 +    tearDown = classmethod(tearDown)
    1.34 +
    1.35 +class TestSomething(unittest.TestCase):
    1.36 +
    1.37 +    layer = Layer
    1.38 +
    1.39 +    def test_something(self):
    1.40 +        pass
    1.41 +
    1.42 +
    1.43 +def test_suite():
    1.44 +    suite = unittest.TestSuite()
    1.45 +    suite.addTest(unittest.makeSuite(TestSomething))
    1.46 +    return suite
    1.47 +
    1.48 +
    1.49 +if __name__ == '__main__':
    1.50 +    unittest.main()