1"""
2unittest2
3
4unittest2 is a backport of the new features added to the unittest testing
5framework in Python 2.7. It is tested to run on Python 2.4 - 2.6.
6
7To use unittest2 instead of unittest simply replace ``import unittest`` with
8``import unittest2``.
9
10
11Copyright (c) 1999-2003 Steve Purcell
12Copyright (c) 2003-2010 Python Software Foundation
13This module is free software, and you may redistribute it and/or modify
14it under the same terms as Python itself, so long as this copyright message
15and disclaimer are retained in their original form.
16
17IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
18SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
19THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
20DAMAGE.
21
22THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
23LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24PARTICULAR PURPOSE.  THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
25AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
26SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
27"""
28
29__all__ = ['TestResult', 'TestCase', 'TestSuite',
30           'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main',
31           'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
32           'expectedFailure', 'TextTestResult', '__version__', 'collector']
33
34__version__ = '0.5.1'
35
36# Expose obsolete functions for backwards compatibility
37__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases'])
38
39
40from unittest2.collector import collector
41from unittest2.result import TestResult
42from unittest2.case import (
43    TestCase, FunctionTestCase, SkipTest, skip, skipIf,
44    skipUnless, expectedFailure
45)
46from unittest2.suite import BaseTestSuite, TestSuite
47from unittest2.loader import (
48    TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,
49    findTestCases
50)
51from unittest2.main import TestProgram, main, main_
52from unittest2.runner import TextTestRunner, TextTestResult
53
54try:
55    from unittest2.signals import (
56        installHandler, registerResult, removeResult, removeHandler
57    )
58except ImportError:
59    # Compatibility with platforms that don't have the signal module
60    pass
61else:
62    __all__.extend(['installHandler', 'registerResult', 'removeResult',
63                    'removeHandler'])
64
65# deprecated
66_TextTestResult = TextTestResult
67
68__unittest = True