File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55from usethis ._ci import update_bitbucket_pytest_steps
66from usethis ._core .ci import use_ci_bitbucket
7- from usethis ._core .tool import use_deptry , use_pre_commit , use_pyproject_fmt , use_ruff
7+ from usethis ._core .tool import (
8+ use_codespell ,
9+ use_deptry ,
10+ use_pre_commit ,
11+ use_pyproject_fmt ,
12+ use_ruff ,
13+ )
814from usethis ._integrations .bitbucket .steps import get_steps_in_default
915from usethis ._test import change_cwd
1016
@@ -256,6 +262,46 @@ def test_content(
256262 "☐ Run your pipeline via the Bitbucket website.\n "
257263 )
258264
265+ class TestCodespellIntegration :
266+ def test_content (
267+ self , uv_init_dir : Path , capfd : pytest .CaptureFixture [str ]
268+ ):
269+ with change_cwd (uv_init_dir ):
270+ # Arrange
271+ use_codespell ()
272+ capfd .readouterr ()
273+
274+ # Act
275+ use_ci_bitbucket ()
276+
277+ # Assert
278+ contents = (uv_init_dir / "bitbucket-pipelines.yml" ).read_text ()
279+ assert "codespell" in contents
280+ assert (
281+ contents
282+ == """\
283+ image: atlassian/default-image:3
284+ definitions:
285+ caches:
286+ uv: ~/.cache/uv
287+ script_items:
288+ - &install-uv |
289+ curl -LsSf https://astral.sh/uv/install.sh | sh
290+ source $HOME/.local/bin/env
291+ export UV_LINK_MODE=copy
292+ uv --version
293+ pipelines:
294+ default:
295+ - step:
296+ name: Run Codespell
297+ caches:
298+ - uv
299+ script:
300+ - *install-uv
301+ - uv run codespell
302+ """
303+ )
304+
259305 def test_lots_of_tools_no_precommit (
260306 self , uv_init_dir : Path , capfd : pytest .CaptureFixture [str ]
261307 ):
You can’t perform that action at this time.
0 commit comments