• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python test.run_only函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: run_only_if_gearman_is_available

def run_only_if_gearman_is_available(func):
    try:
        import gearman
    except ImportError:
        gearman = None
    pred = lambda: gearman is not None
    return run_only(func, pred)
开发者ID:ChristianKniep,项目名称:QNIBCollect,代码行数:7,代码来源:testgearmanstats.py


示例2: run_only_if_pymongo_is_available

def run_only_if_pymongo_is_available(func):
    try:
        import pymongo
    except ImportError:
        pymongo = None
    pred = lambda: pymongo is not None
    return run_only(func, pred)
开发者ID:KlavsKlavsen,项目名称:Diamond,代码行数:7,代码来源:testmongodb.py


示例3: run_only_if_statsd_is_available

def run_only_if_statsd_is_available(func):
    try:
        import statsd
    except ImportError:
        statsd = None
    pred = lambda: statsd is not None
    return run_only(func, pred)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:teststatsdhandler.py


示例4: run_only_if_libvirt_is_available

def run_only_if_libvirt_is_available(func):
    try:
        import libvirt
    except ImportError:
        libvirt = None
    pred = lambda: libvirt is not None
    return run_only(func, pred)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:testxen.py


示例5: run_only_if_psycopg2_is_available

def run_only_if_psycopg2_is_available(func):
    try:
        import psycopg2
    except ImportError:
        psycopg2 = None
    pred = lambda: psycopg2 is not None
    return run_only(func, pred)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:testpgbouncer.py


示例6: run_only_if_beanstalkc_is_available

def run_only_if_beanstalkc_is_available(func):
    try:
        import beanstalkc
    except ImportError:
        beanstalkc = None
    pred = lambda: beanstalkc is not None
    return run_only(func, pred)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:testbeanstalkd.py


示例7: run_only_if_psutil_is_available

def run_only_if_psutil_is_available(func):
    try:
        import psutil
    except ImportError:
        psutil = None
    pred = lambda: psutil is not None
    return run_only(func, pred)
开发者ID:GoodgameStudios,项目名称:Diamond,代码行数:7,代码来源:testprocessresources.py


示例8: run_only_if_ElementTree_is_available

def run_only_if_ElementTree_is_available(func):
    try:
        from xml.etree import ElementTree
    except ImportError:
        ElementTree = None
    pred = lambda: ElementTree is not None
    return run_only(func, pred)
开发者ID:AnderEnder,项目名称:Diamond,代码行数:7,代码来源:testkafka.py


示例9: run_only_if_influxdb_is_available

def run_only_if_influxdb_is_available(func):
    try:
        import influxdb
    except ImportError:
        influxdb = None
    pred = lambda: influxdb is not None
    return run_only(func, pred)
开发者ID:Ssawa,项目名称:Diamond,代码行数:7,代码来源:testinfluxdbhandler.py


示例10: run_only_if_yaml_is_available

def run_only_if_yaml_is_available(func):
    try:
        import yaml
    except ImportError:
        yaml = None
    pred = lambda: yaml is not None
    return run_only(func, pred)
开发者ID:1and1,项目名称:Diamond,代码行数:7,代码来源:testpuppetagent.py


示例11: run_only_if_docker_client_is_available

def run_only_if_docker_client_is_available(func):
    try:
        from docker import Client
    except ImportError:
        Client = None
    pred = lambda: Client is not None
    return run_only(func, pred)
开发者ID:Schoolforbasics,项目名称:Diamond,代码行数:7,代码来源:testdocker_collector.py


示例12: run_only_if_MySQLdb_is_available

def run_only_if_MySQLdb_is_available(func):
    try:
        import MySQLdb
    except ImportError:
        MySQLdb = None
    pred = lambda: MySQLdb is not None
    return run_only(func, pred)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:testmysql.py


示例13: run_only_if_boto_is_available

def run_only_if_boto_is_available(func):
    try:
        import boto
    except ImportError:
        boto = None
    pred = lambda: boto is not None
    return run_only(func, pred)
开发者ID:1and1,项目名称:Diamond,代码行数:7,代码来源:testelb.py


示例14: run_only_if_bernhard_is_available

def run_only_if_bernhard_is_available(func):
    try:
        import bernhard
    except ImportError:
        bernhard = None
    pred = lambda: bernhard is not None
    return run_only(func, pred)
开发者ID:1and1,项目名称:Diamond,代码行数:7,代码来源:testriemann.py


示例15: run_only_if_docker_is_available

def run_only_if_docker_is_available(func):
  try:
    import docker
  except ImportError:
    docker = None
    pred = lambda: docker is not None
    return run_only(func, pred)
开发者ID:sentinellelabs,项目名称:Diamond,代码行数:7,代码来源:testdockerstats.py


示例16: run_only_if_pymongo_is_available

def run_only_if_pymongo_is_available(func):
    try:
        import pymongo
        pymongo  # workaround for pyflakes issue #13
    except ImportError:
        pymongo = None
    pred = lambda: pymongo is not None
    return run_only(func, pred)
开发者ID:ChamaraG,项目名称:Diamond,代码行数:8,代码来源:testmongodb.py


示例17: run_only_if_psutil_is_available

def run_only_if_psutil_is_available(func):
    try:
        import psutil
        psutil  # workaround for pyflakes issue #13
    except ImportError:
        psutil = None
    pred = lambda: psutil is not None
    return run_only(func, pred)
开发者ID:CBarraford,项目名称:Diamond,代码行数:8,代码来源:testprocessresources.py


示例18: run_only_if_redis_is_available

def run_only_if_redis_is_available(func):
    try:
        import redis
        redis  # workaround for pyflakes issue #13
    except ImportError:
        redis = None
    pred = lambda: redis is not None
    return run_only(func, pred)
开发者ID:NitinK-Agarwal,项目名称:Diamond,代码行数:8,代码来源:testredisstat.py


示例19: run_only_if_yaml_is_available

def run_only_if_yaml_is_available(func):
    try:
        import yaml
        yaml  # workaround for pyflakes issue #13
    except ImportError:
        yaml = None
    pred = lambda: yaml is not None
    return run_only(func, pred)
开发者ID:50onRed,项目名称:Diamond,代码行数:8,代码来源:testpuppetagent.py


示例20: run_only_if_MySQLdb_is_available

def run_only_if_MySQLdb_is_available(func):
    try:
        import MySQLdb
        MySQLdb  # workaround for pyflakes issue #13
    except ImportError:
        MySQLdb = None
    pred = lambda: MySQLdb is not None
    return run_only(func, pred)
开发者ID:CBarraford,项目名称:Diamond,代码行数:8,代码来源:testmysql.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python test.test函数代码示例发布时间:2022-05-27
下一篇:
Python test.run函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap