Skip to content

Commit a54b927

Browse files
committed
test that generated lines are less than 88
1 parent 1d5dbd1 commit a54b927

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/test_cli.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import importlib
12
import sys
23

34
import pytest
@@ -24,9 +25,6 @@ def test_cli_help():
2425
sys.platform == "win32", reason="See https://github.com/csdms/bmi-python/issues/10"
2526
)
2627
def test_cli_default(tmpdir):
27-
import importlib
28-
import sys
29-
3028
runner = CliRunner()
3129
with tmpdir.as_cwd():
3230
result = runner.invoke(main, ["MyBmi"])
@@ -38,6 +36,17 @@ def test_cli_default(tmpdir):
3836
assert "MyBmi" in mod.__dict__
3937

4038

39+
@pytest.mark.skipif(
40+
sys.platform == "win32", reason="See https://github.com/csdms/bmi-python/issues/10"
41+
)
42+
def test_cli_wraps_lines(tmpdir):
43+
runner = CliRunner()
44+
with tmpdir.as_cwd():
45+
result = runner.invoke(main, ["MyBmi"])
46+
assert result.exit_code == 0
47+
assert max(len(line) for line in result.output.splitlines()) <= 88
48+
49+
4150
def test_cli_with_hints(tmpdir):
4251
runner = CliRunner()
4352
with tmpdir.as_cwd():

0 commit comments

Comments
 (0)