OLD | NEW |
1 """ | 1 """ |
2 unittest2 | 2 unittest2 |
3 | 3 |
4 unittest2 is a backport of the new features added to the unittest testing | 4 unittest2 is a backport of the new features added to the unittest testing |
5 framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. | 5 framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. |
6 | 6 |
7 To use unittest2 instead of unittest simply replace ``import unittest`` with | 7 To use unittest2 instead of unittest simply replace ``import unittest`` with |
8 ``import unittest2``. | 8 ``import unittest2``. |
9 | 9 |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 from unittest2.runner import TextTestRunner, TextTestResult | 52 from unittest2.runner import TextTestRunner, TextTestResult |
53 | 53 |
54 try: | 54 try: |
55 from unittest2.signals import ( | 55 from unittest2.signals import ( |
56 installHandler, registerResult, removeResult, removeHandler | 56 installHandler, registerResult, removeResult, removeHandler |
57 ) | 57 ) |
58 except ImportError: | 58 except ImportError: |
59 # Compatibility with platforms that don't have the signal module | 59 # Compatibility with platforms that don't have the signal module |
60 pass | 60 pass |
61 else: | 61 else: |
62 __all__.extend(['installHandler', 'registerResult', 'removeResult', | 62 __all__.extend(['installHandler', 'registerResult', 'removeResult', |
63 'removeHandler']) | 63 'removeHandler']) |
64 | 64 |
65 # deprecated | 65 # deprecated |
66 _TextTestResult = TextTestResult | 66 _TextTestResult = TextTestResult |
67 | 67 |
68 __unittest = True | 68 __unittest = True |
OLD | NEW |