test_cli.py — flask Source File
Architecture documentation for test_cli.py, a python file in the flask codebase. 16 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 62c63da0_a9c3_ab0a_4c48_a9413eac90e3["test_cli.py"] 7d9ebc53_a992_d150_c79b_39c114a84acf["importlib.metadata"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 7d9ebc53_a992_d150_c79b_39c114a84acf bdc6911d_da67_3a1f_90cb_90f5e9f0603e["os"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> bdc6911d_da67_3a1f_90cb_90f5e9f0603e 7aa2bb55_1207_c6a6_eaea_dc8955c0e441["platform"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 7aa2bb55_1207_c6a6_eaea_dc8955c0e441 6a188476_d3aa_dee4_00ec_9b6138933f8a["ssl"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 6a188476_d3aa_dee4_00ec_9b6138933f8a 8e9cc1cb_fabe_237c_ff24_85400e094882["sys"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 8e9cc1cb_fabe_237c_ff24_85400e094882 27bc050a_0167_5d02_546e_7c5efffc737b["types"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 27bc050a_0167_5d02_546e_7c5efffc737b 3eebf5bc_1ef0_6524_701b_beec8ec8524a["functools"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 3eebf5bc_1ef0_6524_701b_beec8ec8524a e7a1eae0_bd3b_70ce_3ad8_77d21551aba8["pathlib"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> e7a1eae0_bd3b_70ce_3ad8_77d21551aba8 2681878a_119e_c28f_8e5e_e924c75161c4["click"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 2681878a_119e_c28f_8e5e_e924c75161c4 da94d511_b8b8_a450_f67f_fc28ea9b648a["pytest"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> da94d511_b8b8_a450_f67f_fc28ea9b648a 2608c2d8_7b65_887c_a3bb_6bb925ebfc49["_pytest.monkeypatch"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 2608c2d8_7b65_887c_a3bb_6bb925ebfc49 9bcf2241_db1d_b093_280a_f2c1bcd9b5a8["click.testing"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 9bcf2241_db1d_b093_280a_f2c1bcd9b5a8 8c762fc5_c0b6_0d4d_3889_896d80fbf225["flask"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> 8c762fc5_c0b6_0d4d_3889_896d80fbf225 a7296d2c_84d8_0e72_9e54_0192cfc80c5d["flask.cli"] 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 --> a7296d2c_84d8_0e72_9e54_0192cfc80c5d style 62c63da0_a9c3_ab0a_4c48_a9413eac90e3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
# This file was part of Flask-CLI and was modified under the terms of
# its Revised BSD License. Copyright © 2015 CERN.
import importlib.metadata
import os
import platform
import ssl
import sys
import types
from functools import partial
from pathlib import Path
import click
import pytest
from _pytest.monkeypatch import notset
from click.testing import CliRunner
from flask import Blueprint
from flask import current_app
from flask import Flask
from flask.cli import AppGroup
from flask.cli import find_best_app
from flask.cli import FlaskGroup
from flask.cli import get_version
from flask.cli import load_dotenv
from flask.cli import locate_app
from flask.cli import NoAppException
from flask.cli import prepare_import
from flask.cli import run_command
from flask.cli import ScriptInfo
from flask.cli import with_appcontext
cwd = Path.cwd()
test_path = (Path(__file__) / ".." / "test_apps").resolve()
@pytest.fixture
def runner():
return CliRunner()
def test_cli_name(test_apps):
"""Make sure the CLI object's name is the app's name and not the app itself"""
from cliapp.app import testapp
assert testapp.cli.name == testapp.name
def test_find_best_app(test_apps):
class Module:
app = Flask("appname")
assert find_best_app(Module) == Module.app
class Module:
application = Flask("appname")
assert find_best_app(Module) == Module.application
class Module:
myapp = Flask("appname")
// ... (643 more lines)
Domain
Subdomains
Functions
- dotenv_not_available()
- runner()
- test_app_cli_has_app_context()
- test_appgroup_app_context()
- test_cli_blueprints()
- test_cli_empty()
- test_cli_name()
- test_disable_dotenv_from_env()
- test_dotenv_optional()
- test_dotenv_path()
- test_find_best_app()
- test_flaskgroup_app_context()
- test_flaskgroup_debug()
- test_flaskgroup_nested()
- test_get_version()
- test_help_echo_exception()
- test_help_echo_loading_error()
- test_load_dotenv()
- test_locate_app()
- test_locate_app_raises()
- test_locate_app_suppress_raise()
- test_no_command_echo_loading_error()
- test_prepare_import()
- test_run_cert_adhoc()
- test_run_cert_import()
- test_run_cert_no_ssl()
- test_run_cert_path()
- test_run_exclude_patterns()
- test_scriptinfo()
- test_with_appcontext()
Classes
Dependencies
- _pytest.monkeypatch
- cliapp.app
- click
- click.testing
- dotenv
- flask
- flask.cli
- functools
- importlib.metadata
- os
- pathlib
- platform
- pytest
- ssl
- sys
- types
Source
Frequently Asked Questions
What does test_cli.py do?
test_cli.py is a source file in the flask codebase, written in python. It belongs to the ApplicationCore domain, AppLifeCycle subdomain.
What functions are defined in test_cli.py?
test_cli.py defines 30 function(s): dotenv_not_available, runner, test_app_cli_has_app_context, test_appgroup_app_context, test_cli_blueprints, test_cli_empty, test_cli_name, test_disable_dotenv_from_env, test_dotenv_optional, test_dotenv_path, and 20 more.
What does test_cli.py depend on?
test_cli.py imports 16 module(s): _pytest.monkeypatch, cliapp.app, click, click.testing, dotenv, flask, flask.cli, functools, and 8 more.
Where is test_cli.py in the architecture?
test_cli.py is located at tests/test_cli.py (domain: ApplicationCore, subdomain: AppLifeCycle, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free