def check_config_base(): from mypkg import config, interfaces, usesconfig components.registerAdapter(AdaptRunningConfigToMyConfig, config.MyConfig, IMyConfig) print usesconfig.do_a_config_thing()
def check_config_base(): from mypkg import config, interfaces, usesconfig components.registerAdapter( AdaptRunningConfigToMyConfig, config.MyConfig, IMyConfig) print usesconfig.do_a_config_thing()
def check_config_inherited(): from mypkg import usesconfig from otherpkg import config class OtherConfig(object): def get_attr(self): return "an other attr datum" components.registerAdapter(AdaptRunningConfigToMyConfig, config.OtherConfig, IMyConfig) print usesconfig.do_a_config_thing()
def check_config_inherited(): from mypkg import usesconfig from otherpkg import config class OtherConfig(object): def get_attr(self): return "an other attr datum" components.registerAdapter( AdaptRunningConfigToMyConfig, config.OtherConfig, IMyConfig) print usesconfig.do_a_config_thing()