本文整理汇总了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)