diff --git a/TODO.md b/TODO.md index 33f655a..816fc7d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO: -- tests - add AGPL - add CI - add flake diff --git a/{{ cookiecutter.project_slug }}/README.md b/{{ cookiecutter.project_slug }}/README.md index 23d57dd..7a4eaf5 100644 --- a/{{ cookiecutter.project_slug }}/README.md +++ b/{{ cookiecutter.project_slug }}/README.md @@ -33,8 +33,9 @@ poetry install Tests are run using `pytest`: ``` -pytest +poetry run pytest ``` + {% endif %} ## Author diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 3c63433..fe42c60 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -17,6 +17,13 @@ python = "^3.10" [tool.poetry.scripts] {{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main" +[tool.poetry.group.dev.dependencies] +pytest = "*" +pytest-cov = "*" + +[tool.pytest.ini_options] +addopts = "--cov" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/{{ cookiecutter.project_slug }}/tests/test_dummy.py b/{{ cookiecutter.project_slug }}/tests/test_dummy.py new file mode 100644 index 0000000..35c1b8d --- /dev/null +++ b/{{ cookiecutter.project_slug }}/tests/test_dummy.py @@ -0,0 +1,4 @@ +import {{ cookiecutter.project_slug }} + +def test_dummy(): + assert True diff --git a/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/cli.py b/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/cli.py index 7f605ce..090bab7 100644 --- a/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/cli.py +++ b/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/cli.py @@ -1,5 +1,6 @@ import argparse + def main(): """ Console entrypoint for {{cookiecutter.project_slug}}.""" parser = argparse.ArgumentParser()