本文整理匯總了Python中django_nose.NoseTestSuiteRunner方法的典型用法代碼示例。如果您正苦於以下問題:Python django_nose.NoseTestSuiteRunner方法的具體用法?Python django_nose.NoseTestSuiteRunner怎麽用?Python django_nose.NoseTestSuiteRunner使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類django_nose
的用法示例。
在下文中一共展示了django_nose.NoseTestSuiteRunner方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(*test_args):
if not test_args:
test_args = ['tests']
# Run tests
test_runner = NoseTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(test_args)
if failures:
sys.exit(failures)
示例2: runtests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def runtests(*test_args):
import django
if django.VERSION >= (1, 7):
django.setup()
failures = NoseTestSuiteRunner(verbosity=2,
interactive=True).run_tests(test_args)
sys.exit(failures)
示例3: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(verbosity, *test_args):
from django_nose import NoseTestSuiteRunner
test_runner = NoseTestSuiteRunner(verbosity=verbosity)
if not test_args:
test_args = ['tests']
num_failures = test_runner.run_tests(test_args)
if num_failures:
sys.exit(num_failures)
示例4: runtests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def runtests(*test_args, **kwargs):
if not test_args: test_args = ['django_unixdatetimefield']
import django
try:
django.setup()
except AttributeError:
pass
kwargs.setdefault('interactive', False)
test_runner = django_nose.NoseTestSuiteRunner(**kwargs)
failures = test_runner.run_tests(test_args)
sys.exit(failures)
示例5: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(*test_args):
if not test_args:
test_args = ['tests']
# Run tests
test_runner = NoseTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(test_args)
shutil.rmtree(WALIKI_DATA_DIR)
if failures:
sys.exit(failures)
示例6: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(*test_args):
from django_nose import NoseTestSuiteRunner
if not test_args:
test_args = ['publisher.tests.tests']
test_runner = NoseTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(test_args)
if failures:
sys.exit(failures)
示例7: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(*test_args):
if not test_args:
test_args = ["tests"]
# Run tests
test_runner = NoseTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(test_args)
if failures:
sys.exit(failures)
示例8: run_tests
# 需要導入模塊: import django_nose [as 別名]
# 或者: from django_nose import NoseTestSuiteRunner [as 別名]
def run_tests(*test_args):
if not test_args:
test_args = ['tests']
# Run tests
test_runner = NoseTestSuiteRunner(verbosity=0)
failures = test_runner.run_tests(test_args)
if failures:
sys.exit(failures)