use click.echo(), not print() for better testing

This commit is contained in:
Manuel Barkhau 2019-07-09 10:05:57 +02:00
parent ae8baa541e
commit a3d1a559b8
2 changed files with 13 additions and 18 deletions

View file

@ -190,7 +190,7 @@ def test_nocfg(runner, caplog):
)
def test_novcs_nocfg_init(runner, caplog, capsys):
def test_novcs_nocfg_init(runner, caplog):
_add_project_files("README.md")
# dry mode test
result = runner.invoke(cli.cli, ['init', "-vv", "--dry"])
@ -203,11 +203,6 @@ def test_novcs_nocfg_init(runner, caplog, capsys):
assert log.levelname == 'WARNING'
assert "File not found" in log.message
# print("moep")
# captured = capsys.readouterr()
# assert not captured.err
# assert "Would have written to pycalver.toml:" in captured.out
# non dry mode
result = runner.invoke(cli.cli, ['init', "-vv"])
assert result.exit_code == 0