def test_config_from_envvar(self):
        env = os.environ
        try:
            os.environ = {}
            app = flask.Flask(__name__)
            try:
                app.config.from_envvar('FOO_SETTINGS')
            except __HOLE__, e:
                self.assert_("'FOO_SETTINGS' is not set" in str(e))
            else:
                self.assert_(0, 'expected exception')
            self.assert_(not app.config.from_envvar('FOO_SETTINGS', silent=True))

            os.environ = {'FOO_SETTINGS': __file__.rsplit('.', 1)[0] + '.py'}
            self.assert_(app.config.from_envvar('FOO_SETTINGS'))
            self.common_object_test(app)
        finally:
            os.environ = env
dataset/ETHPy150Open baseblack/ReproWeb/3rdParty/python/flask/testsuite/config.py/ConfigTestCase.test_config_from_envvar