Skip to content

Commit e86914b

Browse files
committed
Fix tests, tweak message
1 parent c5887eb commit e86914b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/check_python_versions/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def check_package(where: str = '.', *, print: PrintFn = print) -> bool:
127127

128128
if not is_package(where):
129129
print("no setup.py or pyproject.toml -- not a Python package?")
130-
print("you may want to try check-python-versions --allow-non-packages")
130+
print("you may want to try --allow-non-packages")
131131
return False
132132

133133
return True

tests/test_cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ def test_check_not_a_directory(tmp_path, capsys):
8686

8787
def test_check_not_a_package(tmp_path, capsys):
8888
assert not cpv.check_package(tmp_path)
89-
assert capsys.readouterr().out == 'no setup.py or pyproject.toml' \
90-
' -- not a Python package?\n'
89+
assert capsys.readouterr().out == textwrap.dedent('''\
90+
no setup.py or pyproject.toml -- not a Python package?
91+
you may want to try --allow-non-packages
92+
''')
9193

9294

9395
def test_check_package(tmp_path):

0 commit comments

Comments
 (0)