Files @ fe050a93936b
Branch filter:

Location: kallithea/pytest.ini

mads
hg: Redirect Mercurial stdout/stderr to logging when running as WSGI

Any "console" output from Mercurial when Kallithea is running from WSGI
should end up in Kallithea's logs. That seems like a nice general feature.

This will however also solve another rare but more critical problem:

Mercurial is writing to sys.stdout / sys.stderr, using several layers of
wrapping. Since Mercurial 5.5 (with
https://repo.mercurial-scm.org/hg/rev/8e04607023e5 ), all writes are given a
memoryview.

Apache httpd mod_wsgi is invoking the WSGI with a custom mod_wsgi.Log injected
in sys.stdout / sys.stderr . This logger can however not handle memoryview -
https://github.com/GrahamDumpleton/mod_wsgi/issues/863 .
[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