How to use the stestr.user_config.get_user_config function in stestr

To help you get started, we’ve selected a few stestr 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 mtreinish / stestr / stestr / commands / load.py View on Github external
def take_action(self, parsed_args):
        user_conf = user_config.get_user_config(self.app_args.user_config)
        args = parsed_args
        if args.suppress_attachments and args.all_attachments:
            msg = ("The --suppress-attachments and --all-attachments "
                   "options are mutually exclusive, you can not use both "
                   "at the same time")
            print(msg)
            sys.exit(1)
        if getattr(user_conf, 'load', False):
            force_init = args.force_init or user_conf.load.get('force-init',
                                                               False)
            pretty_out = args.subunit_trace or user_conf.load.get(
                'subunit-trace', False)
            color = args.color or user_conf.load.get('color', False)
            abbreviate = args.abbreviate or user_conf.load.get('abbreviate',
                                                               False)
            suppress_attachments_conf = user_conf.run.get(
github mtreinish / stestr / stestr / commands / run.py View on Github external
def take_action(self, parsed_args):
        user_conf = user_config.get_user_config(self.app_args.user_config)
        filters = parsed_args.filters
        args = parsed_args
        if args.suppress_attachments and args.all_attachments:
            msg = ("The --suppress-attachments and --all-attachments "
                   "options are mutually exclusive, you can not use both "
                   "at the same time")
            print(msg)
            sys.exit(1)
        if getattr(user_conf, 'run', False):
            if not user_conf.run.get('no-subunit-trace'):
                if not args.no_subunit_trace:
                    pretty_out = True
                else:
                    pretty_out = False
            else:
                pretty_out = False
github mtreinish / stestr / stestr / commands / last.py View on Github external
def take_action(self, parsed_args):
        user_conf = user_config.get_user_config(self.app_args.user_config)
        args = parsed_args
        if args.suppress_attachments and args.all_attachments:
            msg = ("The --suppress-attachments and --all-attachments "
                   "options are mutually exclusive, you can not use both "
                   "at the same time")
            print(msg)
            sys.exit(1)
        if getattr(user_conf, 'last', False):
            if not user_conf.last.get('no-subunit-trace'):
                if not args.no_subunit_trace:
                    pretty_out = True
                else:
                    pretty_out = False
            else:
                pretty_out = False
            pretty_out = args.force_subunit_trace or pretty_out
github mtreinish / stestr / stestr / commands / failing.py View on Github external
def take_action(self, parsed_args):
        user_conf = user_config.get_user_config(self.app_args.user_config)
        args = parsed_args
        if getattr(user_conf, 'failing', False):
            list_opt = args.list or user_conf.failing.get('list', False)
        else:
            list_opt = args.list
        return failing(repo_type=self.app_args.repo_type,
                       repo_url=self.app_args.repo_url,
                       list_tests=list_opt, subunit=args.subunit)