Files @ 3070f9bc6ebe
Branch filter:

Location: kallithea/pytest.ini - annotation

mads
cli: refactor db_create to avoid app initialization in multiple places

Make sure kallithea.config.application.make_app only is invoked at a high level
... and avoid references to kallithea.CONFIG.global_conf right before
kallithea.CONFIG is set to a plain dict again.

Click commands that have both needs_config_file=True and
config_file_initialize_app=True will now be called twice - first time before
setting kallithea.CONFIG but with the config dict as parameter.

That seems kind of intuitive and will simplify the code and allow cleanup of
config handling.

Mute pytype warning:

File "kallithea/bin/kallithea_cli_db.py", line 73, in db_create: No attribute 'global_conf' on Dict[nothing, nothing] [attribute-error]
File "kallithea/bin/kallithea_cli_db.py", line 73, in db_create: No attribute 'local_conf' on Dict[nothing, nothing] [attribute-error]
[pytest]
# only look for tests in kallithea/tests
python_files = kallithea/tests/**/test_*.py
addopts =
    # --verbose
    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
    -rfEsxXw
    # Shorter scrollbacks; less stuff to scroll through
    --tb=short
    #
    --doctest-modules
    --doctest-ignore-import-errors