test_config_from_envvar() — flask Function Reference
Architecture documentation for the test_config_from_envvar() function in test_config.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 4801a421_dcd3_87c1_8ff5_b6b4d9f571f5["test_config_from_envvar()"] af09ffc0_0dff_d9d9_7274_4611c3d0d0e6["test_config.py"] 4801a421_dcd3_87c1_8ff5_b6b4d9f571f5 -->|defined in| af09ffc0_0dff_d9d9_7274_4611c3d0d0e6 962769bb_e427_394b_6793_a30861454cc0["common_object_test()"] 4801a421_dcd3_87c1_8ff5_b6b4d9f571f5 -->|calls| 962769bb_e427_394b_6793_a30861454cc0 style 4801a421_dcd3_87c1_8ff5_b6b4d9f571f5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_config.py lines 144–158
def test_config_from_envvar(monkeypatch):
monkeypatch.setattr("os.environ", {})
app = flask.Flask(__name__)
with pytest.raises(RuntimeError) as e:
app.config.from_envvar("FOO_SETTINGS")
assert "'FOO_SETTINGS' is not set" in str(e.value)
assert not app.config.from_envvar("FOO_SETTINGS", silent=True)
monkeypatch.setattr(
"os.environ", {"FOO_SETTINGS": f"{__file__.rsplit('.', 1)[0]}.py"}
)
assert app.config.from_envvar("FOO_SETTINGS")
common_object_test(app)
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_config_from_envvar() do?
test_config_from_envvar() is a function in the flask codebase, defined in tests/test_config.py.
Where is test_config_from_envvar() defined?
test_config_from_envvar() is defined in tests/test_config.py at line 144.
What does test_config_from_envvar() call?
test_config_from_envvar() calls 1 function(s): common_object_test.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free