U ÙAT^æ+c@stdZddlZddlZddlZddlmZmZddlmZdZ dZ dZ d d „Z d d „Z d d„ZGdd„deƒZeZdS)zUnittest main programéNé)ÚloaderÚrunner)ÚinstallHandlerTaExamples: %(prog)s test_module - run tests from test_module %(prog)s module.TestClass - run tests from module.TestClass %(prog)s module.Class.test_method - run specified test method %(prog)s path/to/test_file.py - run tests from test_file.py aFExamples: %(prog)s - run default set of tests %(prog)s MyTestSuite - run suite 'MyTestSuite' %(prog)s MyTestCase.testSomething - run MyTestCase.testSomething %(prog)s MyTestCase - run all 'test*' test methods in MyTestCase cCsxtj |¡rt| ¡ d¡rttj |¡rXtj |t ¡¡}tj |¡sP| tj ¡rT|S|}|dd…  dd¡  dd¡S|S)Nz.pyiýÿÿÿz\Ú.z/) ÚosÚpathZisfileÚlowerZendswithZisabsZrelpathZgetcwdZ startswithZpardirZreplace)ÚnameZrel_path©r ú%/usr/lib64/python3.8/unittest/main.pyÚ _convert_names r cCsdd„|DƒS)NcSsg|] }t|ƒ‘qSr )r )Z.0r r r r Z .sz"_convert_names..r )Znamesr r r Ú_convert_names-sr cCsd|krd|}|S)NÚ*z*%s*r )Úpatternr r r Ú_convert_select_pattern1src @s²eZdZdZdZdZdZZZZ Z Z dZ dddde jddddddf ddœdd „Zdd d „Zd d „Zdd„Zddd„Zdd„Zdd„Zdd„Zdd„Zd dd„Zdd„ZdS)!Ú TestProgramzA command-line program that runs a set of tests; this is primarily for making test modules conveniently executable. NrÚ__main__TF)Ú tb_localsc CsÊt|tƒrZresultrrZ wasSuccessful)r&r!r r r r%ös2  ü ýzTestProgram.runTestsr:)FNr:)r8Z __module__Z __qualname__Ú__doc__rrrrrr#rr;r*rZdefaultTestLoaderr'r-r,r$r9r+rArBrCr4r%r r r r r7s6ýý &   #  r)rOrrHrZrrZsignalsrZ __unittestr0r2r r rZobjectrZmainr r r r Zs  ]