当前位置: 首页>>代码示例>>Python>>正文


Python tox.cmdline函数代码示例

本文整理汇总了Python中tox.cmdline函数的典型用法代码示例。如果您正苦于以下问题:Python cmdline函数的具体用法?Python cmdline怎么用?Python cmdline使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cmdline函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

def main(args=None):
    global base

    args = parser.parse_args(args)
    base = os.getcwd()
    if args.dir:
        base = args.dir

    if args.command[0] == "sanity":
        auditfiles()
        auditsetup()
    elif args.command[0] == "style":
        auditstyle()
    elif args.command[0] == "test":
        nose()
    elif args.command[0] == "test-all":
        import tox

        tox.cmdline(("-c", os.path.join(base, "tox.ini")))
    elif args.command[0] == "publish":
        printer.info("Going to run sanity checks and tests first")
        auditfiles()
        packagename, packageversion = auditsetup()
        auditstyle()
        nose()
        publish(packagename, packageversion)

    exit(0)
开发者ID:pombredanne,项目名称:docker-python-dev,代码行数:28,代码来源:__init__.py

示例2: run

 def run(self):
     try:
         import tox
     except ImportError:
         import sys
         sys.exit("tox is required to run tests.  $ pip install tox")
     tox.cmdline()
开发者ID:Big-Data,项目名称:python-zombie,代码行数:7,代码来源:setup.py

示例3: main

def main(argv):
    if len(argv) == 1:
        print('Usage: {0} GEN_PATH [TOX_ARGS...]', file=sys.stderr)

    # Get the project root directory.
    project_root = os.path.dirname(os.path.dirname(
        os.path.realpath(__file__)))

    temp_dir = argv[1]
    print('Copying files to ', temp_dir)
    shutil.copytree(project_root, temp_dir)
    os.chdir(temp_dir)

    # Run generation.
    sys.path.insert(0, os.path.realpath('internal'))
    import generate
    generate.main()

    # Run tox.
    import tox
    # tox will raise SystemExit() and try to exit. We don't want that.
    try:
        tox.cmdline(argv[2:])
    except SystemExit:
        pass

    # Print out the directory name for the shell script.
    print(temp_dir)
开发者ID:crvidya,项目名称:python-project-template,代码行数:28,代码来源:test.py

示例4: run_tests

 def run_tests(self):
     import tox
     import shlex
     if self.tox_args:
         errno = tox.cmdline(args=shlex.split(self.tox_args))
     else:
         errno = tox.cmdline(self.test_args)
     sys.exit(errno)
开发者ID:mkouhei,项目名称:backyard,代码行数:8,代码来源:setup.py

示例5: run_tests

 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)
     tox.cmdline(args=args)
开发者ID:dominicscimeca,项目名称:jenkins-job-builder-addons,代码行数:8,代码来源:setup.py

示例6: run_tests

 def run_tests(self):
     # Import here, cause outside the eggs aren't loaded
     import tox  # pylint: disable=import-error
     import shlex
     args = self.tox_args
     if args:
         args = shlex.split(self.tox_args)
     tox.cmdline(args=args)
开发者ID:carsongee,项目名称:flask-htpasswd,代码行数:8,代码来源:setup.py

示例7: run_tests

 def run_tests(self):
     import tox
     args = self.tox_args
     if args:
         args = split(self.tox_args)
     errno = tox.cmdline(args=args)
     exit(errno)
开发者ID:bittner,项目名称:django-todo,代码行数:7,代码来源:setup.py

示例8: run_tests

    def run_tests(self):
        import tox
        if self.environment:
            self.test_args.append('-e{0}'.format(self.environment))

        errno = tox.cmdline(self.test_args)
        sys.exit(errno)
开发者ID:innvent,项目名称:innvent-sso-python-client,代码行数:7,代码来源:setup.py

示例9: _run_tox

    def _run_tox(self):
        self.distribution.fetch_build_eggs(self.requirements_tox)

        import tox

        exit_code = tox.cmdline(args=self.additional_test_args)
        raise SystemExit(exit_code)
开发者ID:ncbi,项目名称:packit,代码行数:7,代码来源:packit_test.py

示例10: run_tests

 def run_tests(self):
     from tox import cmdline
     args = self.tox_args
     if args:
         args = split(self.tox_args)
     errno = cmdline(args=args)
     exit(errno)
开发者ID:jdotjdot,项目名称:django-apptemplates,代码行数:7,代码来源:setup.py

示例11: run_tests

    def run_tests(self):
        # Import here because outside the eggs aren't loaded.
        import tox
        import shlex

        errno = tox.cmdline(args=shlex.split(self.tox_args))
        sys.exit(errno)
开发者ID:Jornason,项目名称:flask-pushjack,代码行数:7,代码来源:setup.py

示例12: run_tests

 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)
开发者ID:jlaska,项目名称:pytest-ansible,代码行数:7,代码来源:setup.py

示例13: run_tests

 def run_tests(self):
     #import here, cause outside the eggs aren't loaded
     import tox
     if self.environment:
         self.test_args.append('-e{0}'.format(self.environment))
     errno = tox.cmdline(self.test_args)
     sys.exit(errno)
开发者ID:myfreecomm,项目名称:django-passaporte-web,代码行数:7,代码来源:setup.py

示例14: run_tests

 def run_tests(self):
     #import here, cause outside the eggs aren't loaded
     import tox
     import os
     del os.environ["PYTHONPATH"]
     errcode = tox.cmdline(self.test_args)
     sys.exit(errcode)
开发者ID:InMobi,项目名称:grill,代码行数:7,代码来源:setup.py

示例15: runtox

    def runtox(self, link):
        # publishing some infos to the commands started by tox
        #setenv_devpi(self.hub, env, posturl=self.current.resultlog,
        #                  packageurl=link.url,
        #                  packagemd5=link.md5)
        jsonreport = link.pkg.rootdir.join("toxreport.json")
        path_archive = link.pkg.path_archive
        toxargs = ["--installpkg", str(path_archive),
                   "-i ALL=%s" % str(self.current.simpleindex),
                   "--result-json", str(jsonreport),
        ]
        unpack_path = link.pkg.path_unpacked

        toxargs.extend(self.get_tox_args(unpack_path=unpack_path))
        with link.pkg.path_unpacked.as_cwd():
            self.hub.info("%s$ tox %s" %(os.getcwd(), " ".join(toxargs)))
            try:
                ret = tox.cmdline(toxargs)
            except SystemExit as e:
                ret = e.args[0]
        if ret != 2:
            jsondata = json.load(jsonreport.open("r"))
            url = URL(link.url)
            post_tox_json_report(self.hub, url.url_nofrag, jsondata)
        if ret != 0:
            self.hub.error("tox command failed", ret)
            return 1
        return 0
开发者ID:t-8ch,项目名称:devpi,代码行数:28,代码来源:test.py


注:本文中的tox.cmdline函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。