def setUp(self): """Sets up the client actions registry.""" super().setUp() registry_copy = client_actions.REGISTRY.copy() registry_init.RegisterClientActions() def stop(): for k in list(client_actions.REGISTRY.keys()): del client_actions.REGISTRY[k] for k, v in registry_copy.items(): client_actions.REGISTRY[k] = v self.addCleanup(stop)
def ClientInit(): """Run all startup routines for the client.""" registry_init.RegisterClientActions() stats_collector_instance.Set(default_stats_collector.DefaultStatsCollector()) config_lib.SetPlatformArchContext() config_lib.ParseConfigCommandLine() client_logging.LogInit() all_parsers.Register() if not config.CONFIG.ContextApplied(contexts.CLIENT_BUILD_CONTEXT): config.CONFIG.Persist("Client.labels") config.CONFIG.Persist("Client.proxy_servers") config.CONFIG.Persist("Client.tempdir_roots")