MCPcopy Create free account
hub / github.com/pallets/flask / test_get_version

Function test_get_version

tests/test_cli.py:231–244  ·  view source on GitHub ↗
(test_apps, capsys)

Source from the content-addressed store, hash-verified

229
230
231def test_get_version(test_apps, capsys):
232 class MockCtx:
233 resilient_parsing = False
234 color = None
235
236 def exit(self):
237 return
238
239 ctx = MockCtx()
240 get_version(ctx, None, "test")
241 out, err = capsys.readouterr()
242 assert f"Python {platform.python_version()}" in out
243 assert f"Flask {importlib.metadata.version('flask')}" in out
244 assert f"Werkzeug {importlib.metadata.version('werkzeug')}" in out
245
246
247def test_scriptinfo(test_apps, monkeypatch):

Callers

nothing calls this directly

Calls 2

get_versionFunction · 0.90
MockCtxClass · 0.85

Tested by

no test coverage detected