python unit testing framework based on erich gamma s junit and kent beck s smalltalk testing framework used with permission this module contains the core framework classes that form the basis of specific test cases and suites testcase testsuite etc and also a textbased utility class for running the tests and reporting the results texttestrunner simple usage import unittest class integerarithmetictestcaseunittest testcase def testaddself test method names begin with test self assertequal1 2 3 self assertequal0 1 1 def testmultiplyself self assertequal0 10 0 self assertequal5 8 40 if name main unittest main further information is available in the bundled documentation and from http docs python orglibraryunittest html c 19992003 steve purcell c 20032010 python software foundation this module is free software and you may redistribute it andor modify it under the same terms as python itself so long as this message and disclaimer are retained in their original form in no event shall the be liable to any party for direct indirect special incidental or consequential damages arising out of the use of this code even if the has been advised of the possibility of such damage the specifically disclaims any warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose the code provided hereunder is on an as is basis and there is no obligation whatsoever to provide maintenance support updates enhancements or modifications isolatedasynciotestcase will be imported lazily lazy import of isolatedasynciotestcase from asynccase it imports asyncio which is relatively heavy but most tests do not need it isolatedasynciotestcase will be imported lazily lazy import of isolatedasynciotestcase from async_case it imports asyncio which is relatively heavy but most tests do not need it
__all__ = ['TestResult', 'TestCase', 'IsolatedAsyncioTestCase', 'TestSuite',
           'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main',
           'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
           'expectedFailure', 'TextTestResult', 'installHandler',
           'registerResult', 'removeResult', 'removeHandler',
           'addModuleCleanup', 'doModuleCleanups', 'enterModuleContext']

__unittest = True

from .result import TestResult
from .case import (addModuleCleanup, TestCase, FunctionTestCase, SkipTest, skip,
                   skipIf, skipUnless, expectedFailure, doModuleCleanups,
                   enterModuleContext)
from .suite import BaseTestSuite, TestSuite
from .loader import TestLoader, defaultTestLoader
from .main import TestProgram, main
from .runner import TextTestRunner, TextTestResult
from .signals import installHandler, registerResult, removeResult, removeHandler







def __dir__():
    return globals().keys() | {'IsolatedAsyncioTestCase'}

def __getattr__(name):
    if name == 'IsolatedAsyncioTestCase':
        global IsolatedAsyncioTestCase
        from .async_case import IsolatedAsyncioTestCase
        return IsolatedAsyncioTestCase
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")