Skip to content

Commit

Permalink
test that generated lines are less than 88
Browse files Browse the repository at this point in the history
  • Loading branch information
mcflugen committed Jan 8, 2024
1 parent 1d5dbd1 commit a54b927
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import importlib
import sys

import pytest
Expand All @@ -24,9 +25,6 @@ def test_cli_help():
sys.platform == "win32", reason="See https://github.com/csdms/bmi-python/issues/10"
)
def test_cli_default(tmpdir):
import importlib
import sys

runner = CliRunner()
with tmpdir.as_cwd():
result = runner.invoke(main, ["MyBmi"])
Expand All @@ -38,6 +36,17 @@ def test_cli_default(tmpdir):
assert "MyBmi" in mod.__dict__


@pytest.mark.skipif(
sys.platform == "win32", reason="See https://github.com/csdms/bmi-python/issues/10"
)
def test_cli_wraps_lines(tmpdir):
runner = CliRunner()
with tmpdir.as_cwd():
result = runner.invoke(main, ["MyBmi"])
assert result.exit_code == 0
assert max(len(line) for line in result.output.splitlines()) <= 88


def test_cli_with_hints(tmpdir):
runner = CliRunner()
with tmpdir.as_cwd():
Expand Down

0 comments on commit a54b927

Please sign in to comment.