<s> import unittest <EOL> import sys <EOL> from . path import TestPath <EOL> from . const import TestConsts <EOL> from . configure import TestUpDownIsDown , TestTriggers <EOL> from . install import TestInstallUninstall <EOL> from . encode import TestEncodeDecode <EOL> from . construct import TestConstruct <EOL> from . enqueue import TestEnqueue <EOL> from . scan import TestScan <EOL> from . import constants as _test_c <EOL> _LOADER = unittest . TestLoader ( ) <EOL> _RUNNER = unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) <EOL> def _extract ( result , errors , failures ) : <EOL> errors += len ( result . errors ) <EOL> failures += len ( result . failures ) <EOL> return errors , failures <EOL> def run_paths ( ) : <EOL> paths_tests = _LOADER . loadTestsFromTestCase ( TestPath ) <EOL> return _RUNNER . run ( paths_tests ) <EOL> def run_consts ( ) : <EOL> consts_tests = _LOADER . loadTestsFromTestCase ( TestConsts ) <EOL> return _RUNNER . run ( consts_tests ) <EOL> def run_updownisdown ( ) : <EOL> updownisdown_tests = _LOADER . loadTestsFromTestCase ( TestUpDownIsDown ) <EOL> return _RUNNER . run ( updownisdown_tests ) <EOL> def run_triggers ( ) : <EOL> triggers_tests = _LOADER . loadTestsFromTestCase ( TestTriggers ) <EOL> return _RUNNER . run ( triggers_tests ) <EOL> def run_install ( ) : <EOL> install_tests = _LOADER . loadTestsFromTestCase ( TestInstallUninstall ) <EOL> return _RUNNER . run ( install_tests ) <EOL> def run_encodedecode ( ) : <EOL> encodedecode_tests = _LOADER . loadTestsFromTestCase ( TestEncodeDecode ) <EOL> return _RUNNER . run ( encodedecode_tests ) <EOL> def run_construct ( ) : <EOL> construct_tests = _LOADER . loadTestsFromTestCase ( TestConstruct ) <EOL> return _RUNNER . run ( construct_tests ) <EOL> def run_enqueue ( ) : <EOL> enqueue_tests = _LOADER . loadTestsFromTestCase ( TestEnqueue ) <EOL> return _RUNNER . run ( enqueue_tests ) <EOL> def run_scan ( ) : <EOL> scan_tests = _LOADER . loadTestsFromTestCase ( TestScan ) <EOL> return _RUNNER . run ( scan_tests ) <EOL> def run_all ( ) : <EOL> failures = errors = <NUM_LIT:0> <EOL> failures , errors = _extract ( run_paths ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_consts ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_updownisdown ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_triggers ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_install ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_encodedecode ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_construct ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_enqueue ( ) , errors , failures ) <EOL> failures , errors = _extract ( run_scan ( ) , errors , failures ) <EOL> print >> sys . stderr , "<STR_LIT>" . format ( _test_c . TOTAL_COUNT ) <EOL> print >> sys . stderr , "<STR_LIT>" "<STR_LIT>" . format ( failures , errors ) </s>
