本文整理汇总了Python中nose.run_exit函数的典型用法代码示例。如果您正苦于以下问题:Python run_exit函数的具体用法?Python run_exit怎么用?Python run_exit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run_exit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: run_tests
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
argv = ['nosetests']
if self.test_suite != 'all':
argv.append('tests/tests.py:' + self.test_suite)
import nose
nose.run_exit(argv=argv)
开发者ID:tianyabeef,项目名称:gutMicrobiome,代码行数:7,代码来源:setup.py
示例2: main
def main(argv=None):
if argv is None:
argv = ['nosetests', '--cover-erase', '--with-coverage',
'--cover-package=fds.log_scraper']
nose.run_exit(argv=argv,
defaultTest=os.path.join(os.path.dirname(__file__), 'tests'))
开发者ID:RohitK89,项目名称:LogScraper,代码行数:7,代码来源:run_tests.py
示例3: unit
def unit(args, nose_run_kwargs=None):
""" Run unittests """
import os, sys
from os.path import join, dirname, abspath
test_project_module = "testproject"
sys.path.insert(0, abspath(join(dirname(__file__), test_project_module)))
sys.path.insert(0, abspath(dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % test_project_module
import nose
os.chdir(test_project_module)
argv = ["--with-django", "--with-cherrypyliveserver", "--with-selenium"] + args
nose_run_kwargs = nose_run_kwargs or {}
nose.run_exit(
argv = ["nosetests"] + argv,
defaultTest = test_project_module,
**nose_run_kwargs
)
开发者ID:t0ster,项目名称:django-sane-testing,代码行数:25,代码来源:pavement.py
示例4: run_tests
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
ret = subprocess.call([sys.executable, sys.argv[0], 'build_ext', '-i'])
if ret != 0:
raise RuntimeError("Building failed!")
import nose
nose.run_exit(argv=['nosetests'])
开发者ID:mikesmyth,项目名称:scikit-umfpack,代码行数:7,代码来源:setup.py
示例5: integrate
def integrate(args):
from citools.pavement import djangonize_test_environment
test_project_module="example_project"
args.extend(['--with-selenium', '--with-cherrypyliveserver', '--with-django', '--with-mongo-database'])
djangonize_test_environment(test_project_module)
import nose
os.chdir(join(options.rootdir, "tests", test_project_module))
from django.conf import settings
from djangosanetesting.utils import get_live_server_path, DEFAULT_URL_ROOT_SERVER_ADDRESS
settings.BUILDMASTER_NETWORK_NAME = getattr(settings, "URL_ROOT_SERVER_ADDRESS", DEFAULT_URL_ROOT_SERVER_ADDRESS)
settings.NETWORK_NAME = get_live_server_path() + "/"
nose.run_exit(
argv = ["nosetests"] + args,
defaultTest = test_project_module,
addplugins = [get_plugin()]
)
开发者ID:centrumholdings,项目名称:cthulhubot,代码行数:25,代码来源:pavement.py
示例6: run_tests
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
try:
import nose
nose.run_exit(argv=['nosetests'])
except ImportError:
pass
开发者ID:kdmurray91,项目名称:mpg,代码行数:7,代码来源:setup.py
示例7: run_all
def run_all():
logging.debug('Running tests with arguments: %r' % sys.argv)
nose.run_exit(
argv=argv,
config=CONFIG,
addplugins=extra_plugins,
)
开发者ID:assekalala,项目名称:gap,代码行数:8,代码来源:run_tests.py
示例8: run_tests
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
import nose
nose.run_exit(argv=['nosetests',
'--with-coverage',
'--cover-erase',
'--cover-branches',
'--cover-package=pbxproj',
'-w', 'tests'])
开发者ID:kronenthaler,项目名称:mod-pbxproj,代码行数:9,代码来源:setup.py
示例9: run_openmdao_suite
def run_openmdao_suite():
"""This function is exported as a script that is runnable as part of
an OpenMDAO virtual environment as openmdao_test.
This function wraps nosetests, so any valid nose args should also
work here.
"""
#Add any default packages/directories to search for tests to tlist.
tlist = ['openmdao']
break_check = ['--help', '-h', '--all']
covpkg = False # if True, --cover-package was specified by the user
# check for args not starting with '-'
args = sys.argv
for i, arg in enumerate(args):
if arg.startswith('--cover-package'):
covpkg = True
if (i>0 and not arg.startswith('-')) or arg in break_check:
break
else: # no non '-' args, so assume they want to run the whole test suite
args.append('--all')
args.append('--exe') # by default, nose will skip any .py files that are
# executable. --exe prevents this behavior
if '--with-coverage' in args:
args.append('--cover-erase')
if '--all' in args and not covpkg:
for pkg in tlist:
opt = '--cover-package=%s' % pkg
if opt not in args:
args.append(opt)
# Better coverage if we clobber cached data.
base = os.path.expanduser(os.path.join('~', '.openmdao'))
for name in ('eggsaver.dat', 'keys'):
path = os.path.join(base, name)
if os.path.exists(path):
os.remove(path)
# this tells it to enable the console in the environment so that
# the logger will print output to stdout. This helps greatly when
# debugging openmdao scripts running in separate processes.
if '--enable_console' in args:
args.remove('--enable_console')
os.environ['OPENMDAO_ENABLE_CONSOLE'] = '1'
if '--all' in args:
args.remove('--all')
args.extend(tlist)
nose.run_exit(argv=args)
开发者ID:drousis,项目名称:OpenMDAO-Framework,代码行数:55,代码来源:testing.py
示例10: start
def start(argv=None):
sys.exitfunc = lambda: sys.stderr.write("Shutting down...\n")
if argv is None:
argv = [
"nosetests", "--cover-branches", "--with-coverage",
"--cover-erase", "--verbose",
"--cover-package=django_foobar",
]
nose.run_exit(argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__)))
开发者ID:inonit,项目名称:django-module-crash-course,代码行数:11,代码来源:runtests.py
示例11: run_tests
def run_tests(test_project_module, nose_args, nose_run_kwargs=None):
djangonize_test_environment(test_project_module)
import nose
os.chdir(join(options.rootdir, "tests", test_project_module))
argv = ["--with-django"] + nose_args
nose_run_kwargs = nose_run_kwargs or {}
nose.run_exit(argv=["nosetests"] + argv, defaultTest=test_project_module, **nose_run_kwargs)
开发者ID:joelimome,项目名称:citools,代码行数:12,代码来源:pavement.py
示例12: integrate_project
def integrate_project(args):
""" Run integration tests """
djangonize_test_environment(options.project_module)
os.chdir(join(options.rootdir, "tests"))
import nose
nose.run_exit(
argv = ["nosetests", "--with-django", "--with-selenium", "--with-djangoliveserver"]+args
)
开发者ID:centrumholdings,项目名称:citools,代码行数:12,代码来源:pavement.py
示例13: run_all
def run_all():
argv = [
"nosetests",
"--nocapture",
"--nologcapture",
"--with-coverage",
"--cover-package=ella_attachments",
"--cover-erase",
"--with-xunit",
]
nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__)))
开发者ID:ella,项目名称:ella-attachments,代码行数:12,代码来源:run_tests.py
示例14: run_all
def run_all(argv=None):
if argv is None:
argv = [
'nosetests',
'--with-coverage', '--cover-package=ella', '--cover-erase',
'--nocapture', '--nologcapture',
'--verbose',
]
nose.run_exit(
argv=argv,
defaultTest=abspath(dirname(__file__)),
)
开发者ID:whit,项目名称:django-redaction,代码行数:13,代码来源:run_tests.py
示例15: run_all
def run_all(args=None):
if not args:
args = [
'nosetests', '--with-xunit', '--with-xcoverage',
'--cover-package=openformats', '--cover-erase',
'--logging-filter=openformats', '--logging-level=DEBUG',
'--verbose',
]
nose.run_exit(
argv=args,
defaultTest=abspath(dirname(__file__))
)
开发者ID:transifex,项目名称:openformats,代码行数:13,代码来源:run_tests.py
示例16: integrate_project
def integrate_project(args):
""" Run integration tests """
from citools.pavement import djangonize_test_environment
djangonize_test_environment(options.project_module)
chdir(join(options.rootdir, "tests", "integration"))
import nose
nose.run_exit(
argv = ["nosetests", "--with-django", "--with-selenium", "--with-djangoliveserver", "-w", join(options.rootdir, "tests", "integration")]+args,
)
开发者ID:rpgplanet,项目名称:rpghrac,代码行数:13,代码来源:pavement.py
示例17: run_all
def run_all(argv=None):
# always insert coverage when running tests
if argv is None:
argv = [
'nosetests',
'--with-coverage', '--cover-package=rfhq', '--cover-erase',
'--verbose',
]
nose.run_exit(
argv=argv,
defaultTest=abspath(dirname(__file__))
)
开发者ID:predicthq,项目名称:rfhq,代码行数:13,代码来源:runner.py
示例18: run_all
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',
'--cover-erase', '--verbose',
]
nose.run_exit(
argv=argv,
defaultTest=abspath(dirname(__file__))
)
开发者ID:Axiacore,项目名称:django-haystack,代码行数:14,代码来源:run_tests.py
示例19: run_all
def run_all(argv=None):
sys.exitfunc = lambda msg='Process shutting down...': sys.stderr.write(msg + '\n')
if argv is None:
argv = [
'nosetests',
'--with-coverage', '--cover-package=ella_galleries', '--cover-erase',
'--nocapture', '--nologcapture',
'--verbose',
]
nose.run_exit(
argv=argv,
defaultTest=abspath(dirname(__file__)),
)
开发者ID:MichalMaM,项目名称:ella-galleries,代码行数:15,代码来源:run_tests.py
示例20: run_all
def run_all(argv=None):
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings"
sys.exitfunc = lambda msg="Process shutting down...": sys.stderr.write(msg + "\n")
# called by setuptools
params = ["--with-coverage", "--cover-package=entree", "--cover-erase", "--with-xunit"]
if argv is None:
argv = ["nosetests"] + params
elif len(argv) == 1: # only the command itself is in argv
argv += params
elif len(argv) > 1:
argv = [argv[0]] + params + argv[1:]
nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__)))
开发者ID:SanomaCZ,项目名称:django-entree,代码行数:15,代码来源:run_tests.py
注:本文中的nose.run_exit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论