Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 def test_reconfigure_backend(self):
     """backend option is read only."""
     c = Configuration()
     c.reconfigure(backend='cuda')
     with pytest.raises(ConfigurationError):
         c.reconfigure(backend='other')
Ejemplo n.º 3
0
 def test_reconfigure_backend(self):
     """backend option is read only."""
     c = Configuration()
     c.reconfigure(backend='cuda')
     with pytest.raises(ConfigurationError):
         c.reconfigure(backend='other')
Ejemplo n.º 4
0
 def test_add_configuration_value(self):
     """Defining an non default argument."""
     c = Configuration()
     c.reconfigure(foo='bar')
     assert c['foo'] == 'bar'
Ejemplo n.º 5
0
 def test_add_configuration_value(self):
     """Defining an non default argument."""
     c = Configuration()
     c.reconfigure(foo='bar')
     assert c['foo'] == 'bar'