Python nose 模块,run_exit() 实例源码

我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用nose.run_exit()

项目:fbtftp    作者:facebook    | 项目源码 | 文件源码
def run_tests(self):
        # Run nose ensuring that argv simulates running nosetests directly
        import nose
        nose.run_exit(argv=['nosetests'])
项目:kibtool    作者:jpparis-orange    | 项目源码 | 文件源码
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__))
  )
项目:mongo-populator    作者:PaladinStudiosBVs    | 项目源码 | 文件源码
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']
项目:fbtftp    作者:axbaretto    | 项目源码 | 文件源码
def run_tests(self):
        # Run nose ensuring that argv simulates running nosetests directly
        import nose
        nose.run_exit(argv=['nosetests'])
项目:django-chemtrails    作者:inonit    | 项目源码 | 文件源码
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__)))
项目:django-hesab    作者:rhblind    | 项目源码 | 文件源码
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__)))
项目:django-haystack-elasticsearch    作者:CraveFood    | 项目源码 | 文件源码
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__))
    )
项目:pythonql    作者:pythonql    | 项目源码 | 文件源码
def run_tests(self):
        # Run the nose ensuring that argv simulates running nosetests directly
        import nose
        nose.run_exit(argv=['nosetests'])
项目:pdf-redactor    作者:JoshData    | 项目源码 | 文件源码
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)
项目:rvmi-rekall    作者:fireeye    | 项目源码 | 文件源码
def run_tests(self):
        # Run nose ensuring that argv simulates running nosetests directly
        import nose
        nose.run_exit(argv=['nosetests'])
项目:affectv_python    作者:csixteen    | 项目源码 | 文件源码
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"]