我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用nose.run_exit()。
def run_tests(self): # Run nose ensuring that argv simulates running nosetests directly import nose nose.run_exit(argv=['nosetests'])
def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests through setup.py if argv is None: argv = [ 'nosetests', '--with-xunit', '--logging-format=%(levelname)s %(name)22s %(funcName)22s:%(lineno)-4d %(message)s', '--with-xcoverage', '--cover-package=kibtool', '--cover-erase', '--verbose', ] nose.run_exit( argv=argv, defaultTest=abspath(dirname(__file__)) )
def run_all(argv=None): if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--cover-package=populator', '--cover-erase', '--logging-filter=mongo-populator', '--logging-level=DEBUG', '--verbose', ] os.environ['MONGO_POPULATOR_CONFIG'] = os.path.join( os.path.dirname(__file__), 'mongo-populator.cfg' ) nose.run_exit( argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__)) ) del os.environ['MONGO_POPULATOR_CONFIG']
def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ 'nosetests', '--verbose', '--with-coverage', '--cover-html', '--cover-html-dir=.htmlcov', '--cover-erase', '--cover-branches', '--cover-package=chemtrails', ] nose.run_exit(argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__)))
def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ 'nosetests', '--verbose', '--with-coverage', '--cover-html', '--cover-html-dir=.htmlcov', '--cover-erase', '--cover-branches', '--cover-package=hesab', ] nose.run_exit(argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__)))
def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests through setup.py if argv is None: argv = [ 'nosetests', '--with-coverage', '--cover-package=haystack_elasticsearch', '--cover-erase', '--verbose', ] nose.run_exit( argv=argv, defaultTest=abspath(dirname(__file__)) )
def run_tests(self): # Run the nose ensuring that argv simulates running nosetests directly import nose nose.run_exit(argv=['nosetests'])
def main(argv=None): if argv is None: argv = ["nosetests"] path = os.path.abspath(os.path.dirname(__file__)) nose.run_exit(argv=argv, defaultTest=path)
def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write("Shutting down....\n") if argv is None: argv = [ "nosetests", "--with-xunit", "--with-xcoverage", "--cover-package=affectv_python", "--cover-erase", "--verbose" ] environ["AFFECTV_COUNTER_KEY"] = "affectv_test:counter" nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__))) del environ["AFFECTV_COUNTER_KEY"]