def test_configuration_illegal_types(self, key, val): """Illegal types for configuration values should raise ConfigurationError.""" c = Configuration() with pytest.raises(ConfigurationError): c[key] = val
def test_reconfigure_backend(self): """backend option is read only.""" c = Configuration() c.reconfigure(backend='cuda') with pytest.raises(ConfigurationError): c.reconfigure(backend='other')
def test_add_configuration_value(self): """Defining an non default argument.""" c = Configuration() c.reconfigure(foo='bar') assert c['foo'] == 'bar'