a DOg+@stdZddlZddlZddlZddlmZmZddlmZdZ dZ dZ d d Z d d Z d dZGdddeZeZdS)zUnittest main programN)loaderrunner)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 cCstj|r||dr|tj|rXtj|t}tj|sP|tj rT|S|}tj |dd dd ddS|S)Nz.py\./) ospathisfilelowerendswithisabsrelpathgetcwd startswithpardirnormpathreplace)nameZrel_pathr2/opt/alt/python39/lib64/python3.9/unittest/main.py _convert_names $rcCsdd|DS)NcSsg|] }t|qSr)r).0rrrr .z"_convert_names..r)namesrrr_convert_names-srcCsd|vrd|}|S)N*z*%s*r)patternrrr_convert_select_pattern1sr!c @seZdZdZdZdZdZZZZ Z Z dZ dddde jddddddf dddd Zdd d Zd d ZddZdddZddZddZddZddZd ddZddZdS)! TestProgramzA command-line program that runs a set of tests; this is primarily for making test modules conveniently executable. Nr__main__TF) tb_localsc Cst|trrErCr:rUrBr]r^r_rOr;rrrrr"7s, &   #  r")rur,rfr rrZsignalsrZ __unittestrHrJrrr!objectr"mainrrrrs  ]