b.t.TestPrefixAliasRegistry(registry.Registry) : class documentation

Part of bzrlib.tests View In Hierarchy

A registry for test prefix aliases.

This helps implement shorcuts for the --starting-with selftest option. Overriding existing prefixes is not allowed but not fatal (a warning will be emitted).

Method register See Registry.register.
Method resolve_alias Replace the alias by the prefix in the given string.

Inherited from Registry:

Method __init__ Create a new Registry.
Method register_lazy Register a new object to be loaded on request.
Method get Return the object register()'ed to the given key.
Method get_prefix Return an object whose key is a prefix of the supplied value.
Method get_help Get the help text associated with the given key
Method get_info Get the extra information associated with the given key
Method remove Remove a registered entry.
Method __contains__ Undocumented
Method keys Get a list of registered entries
Method iteritems Undocumented
Method items Undocumented
Method _add_help_and_info Add the help and information about this key
Method _get_module Return the module the object will be or was loaded from.
Method _get_key_or_default Return either 'key' or the default key if key is None
Method _set_default_key Undocumented
Method _get_default_key Undocumented
def register(self, key, obj, help=None, info=None, override_existing=False):
See Registry.register.

Trying to override an existing alias causes a warning to be emitted, not a fatal execption.

def resolve_alias(self, id_start):
Replace the alias by the prefix in the given string.

Using an unknown prefix is an error to help catching typos.

API Documentation for Bazaar, generated by pydoctor at 2021-09-16 00:20:35.