def test_config_immutable(self): def set_attr(config: AdapterFusionConfig): config.temperature = True for config in ADAPTERFUSION_CONFIG_MAP.values(): with self.subTest(config=config.__class__.__name__): self.assertRaises(FrozenInstanceError, lambda: set_attr(config))
def test_custom_attr(self): for config in ADAPTERFUSION_CONFIG_MAP.values(): with self.subTest(config=config.__class__.__name__): config.dummy_attr = "test_value" self.assertEqual(config.dummy_attr, "test_value")