diff --git a/pyproject.toml b/pyproject.toml index cae52be04..dc6142541 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ branch = true [tool.pytest.ini_options] testpaths = ["tests"] +addopts = "-p no:logging" [tool.setuptools] include-package-data = true diff --git a/tests/test_main.py b/tests/test_main.py index 4f18632a3..316e46b20 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -38,3 +38,10 @@ def test_main__argparse__enable_debug_logging(patched_controller, patched_loggin def test_main__argparse__invalid_arg(): with pytest.raises(SystemExit): main(["--invalid"]) + + +@patch("seedsigner.main.Controller") +def test_main__logging__writes_to_stderr(patched_controller, capsys): + main([]) + out, err = capsys.readouterr() + assert "INFO: Starting Seedsigner with: {'loglevel': 'INFO'}" in err