Add a context to the suite.

        Args:
            name (str): Name to store the context under.
            context (ResolvedContext): Context to add.
964487
def add_context(self, name, context, prefix_char=None):
        
        if name in self.contexts:
            raise SuiteError("Context already in suite: %r" % name)
        if not context.success:
            raise SuiteError("Context is not resolved: %r" % name)

        self.contexts[name] = dict(name=name,
                                   context=context.copy(),
                                   tool_aliases={},
                                   hidden_tools=set(),
                                   priority=self._next_priority,
                                   prefix_char=prefix_char)
        self._flush_tools()
291513
def patch_context(self, context):
        
        context.__class__ = PatchedContext
        # Simply setting __class__ directly doesn't work
        # because behave.runner.Context.__setattr__ is implemented wrongly.
        object.__setattr__(context, '__class__', PatchedContext)
423334
def add(self, name, extends, **kwargs):
        
        f = extends
        self._push(name=name,
                   module_=f.__module__,
                   class_=f.__name__,
                   method_=f.__name__,
                   is_class_=False,
                   **kwargs)
590137
def add(self, name, value):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        self._map[normalized_name].append(value)
138209
def _add(self, name, *args, **kw):
        
        argname = list(self.argdict)[self._argno]
        if argname != name:
            raise NameError(
                'Setting argument %s, but it should be %s' % (name, argname))
        self._group.add_argument(*args, **kw)
        self.all_arguments.append((args, kw))
        self.names.append(name)
        self._argno += 1
537247
def _add_property(self, name, default_value):
        

        name = str(name)
        self._properties[name] = default_value
667426
def set_current_context(self, name):
        """"""
        if self.context_exists(name):
            self.data['current-context'] = name
        else:
            raise KubeConfError("Context does not exist.")
1349708
def addNamespace(self, namespace, **context):
        
        self.connection().addNamespace(namespace, orb.Context(**context))
197065
def remove_context(self, name):
        
        self._context(name)
        del self.contexts[name]
        self._flush_tools()
141060
private void addContext(
      final EvaluatorRuntimeProtocol.AddContextProto addContextProto)
      throws ContextClientCodeException {

    synchronized (this.contextStack) {
      try {

        final ContextRuntime currentTopContext = this.contextStack.peek();

        if (!currentTopContext.getIdentifier().equals(addContextProto.getParentContextId())) {
          throw new IllegalStateException("Trying to instantiate a child context on context with id `" +
              addContextProto.getParentContextId() + "` while the current top context id is `" +
              currentTopContext.getIdentifier() + "`");
        }

        final Configuration contextConfiguration =
            this.configurationSerializer.fromString(addContextProto.getContextConfiguration());

        final ContextRuntime newTopContext;
        if (addContextProto.hasServiceConfiguration()) {
          newTopContext = currentTopContext.spawnChildContext(contextConfiguration,
              this.configurationSerializer.fromString(addContextProto.getServiceConfiguration()));
        } else {
          newTopContext = currentTopContext.spawnChildContext(contextConfiguration);
        }

        this.contextStack.push(newTopContext);

      } catch (final IOException | BindException e) {
        throw new RuntimeException("Unable to read configuration.", e);
      }

    }
  }
560012
def add(name, **kwargs):
    
    _CONFIG.add_section(name)

    for (key, value) in kwargs.items():
        _CONFIG.set(name, key, value)

    with open(_CONFIG_FILEPATH, 'w') as configfile:
        _CONFIG.write(configfile)

    info('Configuration updated at %s' % _JUT_HOME)
1086806
def context(names):
    """"""
    import json

    contexts = [_context_json(name) for name in set(names)]
    if contexts:
        click.echo(
            json.dumps(
                contexts[0] if len(contexts) == 1 else contexts,
                indent=2,
            )
        )
926372
def add_scenario(self, parameter: 'Parameter', scenario_name: str = default_scenario):
        
        self.scenarios[scenario_name] = parameter
1079681
public void addWorld(String name) {
        if (name != null && Common.getInstance().getServerCaller().worldExist(name) && !worldExist(name)) {
            worldList.add(name);
            save();
        }
    }
742498
def create(context, name):
    

    result = tag.create(context, name=name)
    utils.format_output(result, context.format)
537759
def include(_name_or_func, *args,
            _module=None, _default='includeme', **kwargs):
    
    if callable(_name_or_func):
        resolved = _name_or_func
    else:
        resolved = resolve_str(_name_or_func, _module, _default)

    resolved(*args, **kwargs)
266069
public void setName(String name) {
		if (name == null || name.isEmpty()) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.EMPTY_NAME,
					"The context name must not be null nor empty.");
		}

		this.name = name;
	}