"silent" keyword argument only partially implemented by Config.from_envvar #414

Closed
dave-shawley opened this Issue Mar 1, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

dave-shawley commented Mar 1, 2012

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:

    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

dave-shawley added a commit to dave-shawley/flask that referenced this issue Mar 1, 2012

Contributor

DasIch commented Jun 19, 2013

Fixed by #415

@DasIch DasIch closed this Jun 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment