本文整理匯總了Python中nose.run_exit方法的典型用法代碼示例。如果您正苦於以下問題:Python nose.run_exit方法的具體用法?Python nose.run_exit怎麽用?Python nose.run_exit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nose
的用法示例。
在下文中一共展示了nose.run_exit方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: start
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
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_drf_filepond",
]
# argv = [
# "nosetests", "--cover-branches", "--verbose",
# "--cover-package=django_drf_filepond",
# ]
nose.run_exit(argv=argv,
defaultTest=os.path.abspath(os.path.dirname(__file__)))
示例2: run_tests
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
import nose
nose.run_exit(argv=['nosetests'])
示例3: run_tests
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
def run_tests(self):
import nose
test_script = os.path.join('b2handle', 'tests', 'main_test_script.py')
# See also nosetests section in setup.cfg
nose.run_exit(argv=['nosetests', test_script])
# Set common test dependencies
示例4: all
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
def all():
argv = ['nosetests', '--verbose', '--logging-level=ERROR']
nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__)))
示例5: run_tests
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
def run_tests(self):
import nose
nose.run_exit(argv=['nosetests', '--with-xunit', '--xunit-file=test-reports/unittests.xml'])
示例6: start
# 需要導入模塊: import nose [as 別名]
# 或者: from nose import run_exit [as 別名]
def start(argv=None):
sys.exitfunc = lambda: sys.stderr.write("Shutting down...\n")
if argv is None:
argv = [
"nosetests",
"--verbose",
"--with-coverage",
"--cover-erase",
"--cover-branches",
"--cover-package=drf_haystack",
]
nose.run_exit(argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__)))