mitsuhiko/flask — Issue #414: "silent" keyword argument only partially implemented by Config.from_envvar
Author: dave-shawley
Created: 2012-03-01 13:53:31+00:00
State: open

``Config.from_envvar`` raises an exception if the configuration variable exists and references a file that does not exist. The expectation is that the following test case should pass:

```python
def test_config_from_envvar_missing(self):
env = os.environ
try:
os.environ = {'FOO_SETTINGS': 'missing.cfg'}
try:
app = flask.Flask(__name__)
app.config.from_envvar('FOO_SETTINGS')
except IOError:
pass
else:
self.fail('expected IOError')
self.assertFalse(not app.config.from_envvar('FOO_SETTINGS', silent=True))
finally:
os.environ = env
```