Exemplo n.º 1
0
def ignore_case(case, reason):
    from odps.compat import unittest
    decorator = unittest.skip(reason)
    return decorator(case)
Exemplo n.º 2
0

def start_coverage():
    if not in_coverage_mode():
        return
    os.environ['COVERAGE_PROCESS_START'] = ''
    try:
        import coverage
        coverage.process_startup()
    except ImportError:
        pass


def ignore_case(case, reason):
    from odps.compat import unittest
    decorator = unittest.skip(reason)
    return decorator(case)


def ci_skip_case(obj):
    if 'CI_MODE' in os.environ:
        return ignore_case(obj, 'Intentionally skipped in CI mode.')
    else:
        return obj


def module_depend_case(mod_names):
    if isinstance(mod_names, six.string_types):
        mod_names = [
            mod_names,
        ]