-- -- --- --- --- --- --- --- ------- ------- ------- |
import sys
-- -- --- --- --- --- --- --- ------- ------- ------- |
from pathlib import Path
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
from click.testing import CliRunner
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
import wily.__main__ as main
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
_path = "src\\test.py" if sys.platform == "win32" else "src/test.py"
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
def test_report_no_cache(tmpdir, cache_path):
-- -- 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
runner = CliRunner()
-- -- 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
result = runner.invoke(
-- -- 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
main.cli, ["--path", tmpdir, "--cache", cache_path, "report", _path]
-- -- 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
)
-- -- 001 002 001 002 003 003 0004.75 0002.38 0000.50 |
assert result.exit_code == 1, result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with a build and a specific metric
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli,
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
["--path", builddir, "report", _path, "raw.multi", "maintainability.rank"],
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
def test_report_granular(builddir):
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"""
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
Test that report works with a build against specific metrics and a function
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"""
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
runner = CliRunner()
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
result = runner.invoke(
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
main.cli,
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
[
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"--path",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
builddir,
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"report",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
_path + ":function1",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"cyclomatic.complexity",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"--message",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
"-n",
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
1,
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
],
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
)
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
assert result.exit_code == 0, result.stdout
-- -- 003 006 003 006 009 009 0028.53 0042.79 0001.50 |
assert "remove line" in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_not_found(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with a build but not with an invalid path
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli, ["--path", builddir, "report", "test1.py", "raw.loc"]
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_default_metrics(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with default metrics
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(main.cli, ["--path", builddir, "report", _path])
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_path(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report with a path to a folder (aggregate values)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(main.cli, ["--path", builddir, "report", "src"])
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
def test_report_with_message(builddir):
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
"""
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
Test that report works messages in UI
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
"""
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
runner = CliRunner()
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
result = runner.invoke(
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
main.cli, ["--path", builddir, "report", _path, "raw.multi", "--message"]
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
)
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert result.exit_code == 0, result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "basic test" in result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "remove line" in result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
def test_report_with_message_and_n(builddir):
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
"""
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
Test that report works messages in UI
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
"""
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
runner = CliRunner()
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
result = runner.invoke(
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
main.cli,
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
["--path", builddir, "report", _path, "raw.multi", "--message", "-n", 1],
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
)
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert result.exit_code == 0, result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "basic test" not in result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "remove line" in result.stdout
-- -- 003 006 004 008 009 012 0038.04 0076.08 0002.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
def test_report_changes_only(builddir, caplog):
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
"""
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
Test that report works when only displaying changes
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
"""
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
runner = CliRunner()
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
result = runner.invoke(
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
main.cli, ["--path", builddir, "report", _path, "raw.multi", "-c"]
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
)
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
assert result.exit_code == 0, result.stdout
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
assert "basic test" not in result.stdout
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
assert "remove line" not in result.stdout
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
assert "Not found" not in result.stdout
-- -- 003 008 005 010 011 015 0051.89 0097.30 0001.88 |
assert "No data found" in caplog.text
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_high_metric(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with a build on a metric expecting high values
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli, ["--path", builddir, "report", _path, "raw.comments"]
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_wrapped(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with wrapping
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli, ["--path", builddir, "report", "--wrap", _path, "raw.comments"]
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_short_metric(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with a build on shorthand metric
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(main.cli, ["--path", builddir, "report", _path, "sloc"])
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_low_metric(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with a build on a metric expecting high values
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli, ["--path", builddir, "report", _path, "maintainability.mi"]
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
def test_report_html_format(builddir):
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
Test that report works with HTML as format
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
runner = CliRunner()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
result = runner.invoke(
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
main.cli, ["--path", builddir, "report", _path, "--format", "HTML"]
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
)
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = Path().cwd()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = path / "wily_report" / "index.html"
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert path.exists()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "<html>" in path.read_text()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert result.exit_code == 0, result.stdout
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
def test_report_html_format_target_folder(builddir):
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
Test that report works with HTML as format
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
runner = CliRunner()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
result = runner.invoke(
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
main.cli, ["--path", builddir, "report", _path, "--format", "HTML", "-o", "foo"]
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
)
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = Path().cwd()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = path / "foo" / "index.html"
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert path.exists()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "<html>" in path.read_text()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert result.exit_code == 0, result.stdout
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
def test_report_html_format_target_file(builddir):
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
Test that report works with HTML as format
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
"""
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
runner = CliRunner()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
result = runner.invoke(
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
main.cli,
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
["--path", builddir, "report", _path, "--format", "HTML", "-o", "foo/bar.html"],
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
)
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = Path().cwd()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
path = path / "foo" / "bar.html"
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert path.exists()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "<html>" in path.read_text()
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert result.exit_code == 0, result.stdout
-- -- 004 010 005 010 014 015 0057.11 0114.22 0002.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_console_format(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
Test that report works with console as format
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
runner = CliRunner()
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
result = runner.invoke(
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
main.cli, ["--path", builddir, "report", _path, "--format", "CONSOLE"]
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
)
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert result.exit_code == 0, result.stdout
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
assert "Not found" not in result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
def test_report_not_existing_format(builddir):
-- -- 002 004 002 004 006 006 0015.51 0015.51 0001.00 |
"""
-- -- --- --- --- --- --- --- ------- ------- ------- |
Test that report works with non-existing format
-- -- --- --- --- --- --- --- ------- ------- ------- |
"""
-- -- --- --- --- --- --- --- ------- ------- ------- |
runner = CliRunner()
-- -- --- --- --- --- --- --- ------- ------- ------- |
result = runner.invoke(
-- -- --- --- --- --- --- --- ------- ------- ------- |
main.cli, ["--path", builddir, "report", _path, "--format", "non-existing"]
-- -- --- --- --- --- --- --- ------- ------- ------- |
)
-- -- --- --- --- --- --- --- ------- ------- ------- |
assert result.exit_code == 2, result.stdout
-- -- --- --- --- --- --- --- ------- ------- ------- |
assert "Not found" not in result.stdout