本文整理匯總了Python中tox.cmdline方法的典型用法代碼示例。如果您正苦於以下問題:Python tox.cmdline方法的具體用法?Python tox.cmdline怎麽用?Python tox.cmdline使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tox
的用法示例。
在下文中一共展示了tox.cmdline方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_tox_cmdline_no_args
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def test_tox_cmdline_no_args(monkeypatch, initproj):
initproj("help", filedefs={"tox.ini": ""})
monkeypatch.setattr(sys, "argv", ["caller_script", "--help"])
with pytest.raises(SystemExit):
tox.cmdline()
示例2: test_tox_cmdline_args
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def test_tox_cmdline_args(initproj):
initproj("help", filedefs={"tox.ini": ""})
with pytest.raises(SystemExit):
tox.cmdline(["caller_script", "--help"])
示例3: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import tox
errno = tox.cmdline(self.tox_args)
sys.exit(errno)
示例4: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
# Import here, cause outside the eggs aren't loaded
import tox
import shlex
import sys
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
else:
# Run all tests by default
args = ['-c', join(dirname(__file__), 'tox.ini'), 'tests']
errno = tox.cmdline(args=args)
sys.exit(errno)
示例5: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
# Import here, cause outside the eggs aren't loaded
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
else:
# Run all tests by default
args = ['-c', os.path.join(os.path.dirname(__file__), 'tox.ini'), 'tests']
errno = tox.cmdline(args=args)
sys.exit(errno)
示例6: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
示例7: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
"""Run tests."""
# import here, cause outside the eggs aren't loaded
import tox
errcode = tox.cmdline(self.test_args)
sys.exit(errcode)
示例8: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
示例9: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import tox
sys.exit(tox.cmdline())
示例10: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)
示例11: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
errcode = tox.cmdline(self.test_args)
sys.exit(errcode)
示例12: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import shlex
import tox
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
示例13: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)
示例14: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
import tox
errcode = tox.cmdline(self.test_args)
sys.exit(errcode)
示例15: run_tests
# 需要導入模塊: import tox [as 別名]
# 或者: from tox import cmdline [as 別名]
def run_tests(self):
"""Invoke the test runner (tox)."""
# import here, cause outside the eggs aren't loaded
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)