@@ -0,0 +1,1954 @@
+from click.testing import CliRunner%0A%0Afrom bmipy.cmd import main%0A%0A%0Adef test_cli_version():%0A    runner = CliRunner()%0A    result = runner.invoke(main, %5B%22--version%22%5D)%0A    assert result.exit_code == 0%0A    assert %22version%22 in result.output%0A%0A%0Adef test_cli_help():%0A    runner = CliRunner()%0A    result = runner.invoke(main, %5B%22--help%22%5D)%0A    assert result.exit_code == 0%0A    assert %22help%22 in result.output%0A%0A%0Adef test_cli_default(tmpdir):%0A    import importlib%0A    import sys%0A%0A    runner = CliRunner()%0A    with tmpdir.as_cwd():%0A        result = runner.invoke(main, %5B%22MyBmi%22%5D)%0A        assert result.exit_code == 0%0A        with open(%22mybmi.py%22, %22w%22) as fp:%0A            fp.write(result.output)%0A        sys.path.append(%22.%22)%0A        mod = importlib.import_module(%22mybmi%22)%0A        assert %22MyBmi%22 in mod.__dict__%0A%0A%0Adef test_cli_with_hints(tmpdir):%0A    import importlib%0A    import sys%0A%0A    runner = CliRunner()%0A    with tmpdir.as_cwd():%0A        result = runner.invoke(main, %5B%22MyBmiWithHints%22, %22--hints%22%5D)%0A        assert result.exit_code == 0%0A        assert %22-%3E%22 in result.output%0A%0A%0Adef test_cli_without_hints(tmpdir):%0A    import importlib%0A    import sys%0A%0A    runner = CliRunner()%0A    with tmpdir.as_cwd():%0A        result = runner.invoke(main, %5B%22MyBmiWithoutHints%22, %22--no-hints%22%5D)%0A        assert result.exit_code == 0%0A        assert %22-%3E%22 not in result.output%0A%0A%0Adef test_cli_with_black(tmpdir):%0A    import importlib%0A    import sys%0A%0A    runner = CliRunner()%0A    with tmpdir.as_cwd():%0A        result = runner.invoke(main, %5B%22MyBmiWithHints%22, %22--black%22%5D)%0A        assert result.exit_code == 0%0A        assert max(%5Blen(line) for line in result.output.splitlines()%5D) %3C= 88%0A%0A%0Adef test_cli_without_hints(tmpdir):%0A    import importlib%0A    import sys%0A%0A    runner = CliRunner()%0A    with tmpdir.as_cwd():%0A        result = runner.invoke(main, %5B%22MyBmiWithoutHints%22, %22--no-black%22%5D)%0A        assert result.exit_code == 0%0A        assert max(%5Blen(line) for line in result.output.splitlines()%5D) %3E 88%0A

add test for the bmipy-render command