Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ $ uvx usethis init
☐ Add test files to the '/tests' directory with the format 'test_*.py'.
☐ Add test functions with the format 'test_*()'.
☐ Run 'uv run pytest' to run the tests.
☐ Run 'uv run pytest --cov' to run your tests with Coverage.py.
```

To use Ruff on an existing project, run:
Expand Down
3 changes: 2 additions & 1 deletion src/usethis/_toolset/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from usethis._core.tool import use_pytest
from usethis._core.tool import use_coverage_py, use_pytest


def use_test_frameworks(remove: bool = False, how: bool = False):
use_pytest(remove=remove, how=how)
use_coverage_py(remove=remove, how=how)
2 changes: 1 addition & 1 deletion tests/usethis/_integrations/uv/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from usethis._test import change_cwd


class TestTestOpinionatedUVInit:
class TestOpinionatedUVInit:
def test_empty_dir(self, tmp_path: Path):
# Act
with change_cwd(tmp_path):
Expand Down
3 changes: 3 additions & 0 deletions tests/usethis/_interface/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def test_pre_commit_included(self, tmp_path: Path):
"☐ Add test files to the '/tests' directory with the format 'test_*.py'.\n"
"☐ Add test functions with the format 'test_*()'.\n"
"☐ Run 'uv run pytest' to run the tests.\n"
"☐ Run 'uv run pytest --cov' to run your tests with Coverage.py.\n"
)

# Check the pre-commit hooks are added in the correct order
Expand Down Expand Up @@ -87,6 +88,7 @@ def test_readme_example(self, tmp_path: Path):
☐ Add test files to the '/tests' directory with the format 'test_*.py'.
☐ Add test functions with the format 'test_*()'.
☐ Run 'uv run pytest' to run the tests.
☐ Run 'uv run pytest --cov' to run your tests with Coverage.py.
"""
)

Expand Down Expand Up @@ -156,6 +158,7 @@ def test_bitbucket_docstyle_and_status(self, tmp_path: Path):
"☐ Add test files to the '/tests' directory with the format 'test_*.py'.\n"
"☐ Add test functions with the format 'test_*()'.\n"
"☐ Run 'uv run pytest' to run the tests.\n"
"☐ Run 'uv run pytest --cov' to run your tests with Coverage.py.\n"
"✔ Adding Bitbucket Pipelines configuration.\n"
"☐ Run your pipeline via the Bitbucket website.\n"
)