Skip to content

Commit 84002ba

Browse files
Update tests to reflect new message behaviour
1 parent 261a6ae commit 84002ba

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

tests/usethis/_core/test_core_tool.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,8 @@ def test_dependency(self, uv_init_dir: Path, capfd: pytest.CaptureFixture[str]):
850850
"✔ Adding dependency 'import-linter' to the 'dev' group in 'pyproject.toml'.\n"
851851
"☐ Install the dependency 'import-linter'.\n"
852852
"✔ Adding Import Linter config to 'pyproject.toml'.\n"
853+
"ℹ Ensure '__init__.py' files are used in your packages.\n" # noqa: RUF001
854+
"ℹ For more info see <https://docs.python.org/3/tutorial/modules.html#packages>\n" # noqa: RUF001
853855
"☐ Run 'lint-imports' to run Import Linter.\n"
854856
)
855857

@@ -1268,6 +1270,8 @@ def test_stdout_when_cant_find_package(
12681270
"⚠ Could not find any importable packages.\n"
12691271
"⚠ Assuming the package name is test-stdout-when-cant-find-pac0.\n"
12701272
"✔ Adding Import Linter config to 'pyproject.toml'.\n"
1273+
"ℹ Ensure '__init__.py' files are used in your packages.\n" # noqa: RUF001
1274+
"ℹ For more info see <https://docs.python.org/3/tutorial/modules.html#packages>\n" # noqa: RUF001
12711275
"☐ Run 'lint-imports' to run Import Linter.\n"
12721276
)
12731277

@@ -1400,6 +1404,8 @@ def test_config(
14001404
"☐ Install the dependency 'import-linter'.\n"
14011405
"✔ Adding Import Linter config to 'pyproject.toml'.\n"
14021406
"✔ Adding hook 'import-linter' to '.pre-commit-config.yaml'.\n"
1407+
"ℹ Ensure '__init__.py' files are used in your packages.\n" # noqa: RUF001
1408+
"ℹ For more info see <https://docs.python.org/3/tutorial/modules.html#packages>\n" # noqa: RUF001
14031409
"☐ Run 'pre-commit run import-linter --all-files' to run Import Linter.\n"
14041410
)
14051411

tests/usethis/_interface/test_tool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ def test_how(self, tmp_path: Path):
187187
assert (
188188
result.output
189189
== """\
190+
ℹ Ensure '__init__.py' files are used in your packages.
191+
ℹ For more info see <https://docs.python.org/3/tutorial/modules.html#packages>
190192
☐ Run 'lint-imports' to run Import Linter.
191-
"""
193+
""" # noqa: RUF001
192194
)
193195

194196

0 commit comments

Comments
 (0)