How to use the betelgeuse.config function in Betelgeuse

To help you get started, we’ve selected a few Betelgeuse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SatelliteQE / betelgeuse / betelgeuse / __init__.py View on Github external
def cli(ctx, config_module):
    """Betelgeuse CLI command group."""
    ctx.obj = config.BetelgeuseConfig(config_module)
github SatelliteQE / betelgeuse / betelgeuse / __init__.py View on Github external
return result


def parse_test_results(test_results):
    """Return the summary of test results by their status.

    :param test_results: A list of dicts with information about
        test results, such as those reported in a jUnit file.
    :return: A dictionary containing a summary for all test results
        provided by the ``test_results`` parameter, broken down by their
        status.
    """
    return Counter([test['status'] for test in test_results])


pass_config = click.make_pass_decorator(config.BetelgeuseConfig, ensure=True)


@click.group()
@click.option(
    '--config-module',
    envvar='BETELGEUSE_CONFIG_MODULE',
    help='Python import path to the config module. E.g. '
    '"package.myconfig.module".',
)
@click.version_option()
@click.pass_context
def cli(ctx, config_module):
    """Betelgeuse CLI command group."""
    ctx.obj = config.BetelgeuseConfig(config_module)