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


Python test.run_only函数代码示例

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


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


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