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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# python-template

[![Validation Workflow](https://github.com/mbeacom/python-template/actions/workflows/validate.yaml/badge.svg?branch=main&event=push)](https://github.com/mbeacom/python-template/actions/workflows/validate.yaml)
[![Pre-Commit Checks Workflow](https://github.com/mbeacom/python-template/actions/workflows/pre-commit.yaml/badge.svg?branch=main&event=push)](https://github.com/mbeacom/python-template/actions/workflows/pre-commit.yaml)
[![Coverage Status](https://codecov.io/github/mbeacom/python-template/coverage.svg?branch=main)](https://codecov.io/github/mbeacom/python-template?branch=main)
[![PyPi](https://img.shields.io/pypi/v/python-template-x)](https://pypi.org/project/python-template-x/)

This project is an opinionated python template.

## Usage
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ target-version = "py311"
"FBT", # Ignore booleans as positional arguments in tests, e.g., @pytest.mark.parametrize()
]

[tool.coverage.run]
omit = [
"*/tests/*",
"*/__init__.py",
"*/__main__.py",
]

[tool.poe.tasks]
isort = "isort --profile=black ."
black = "black ."
Expand Down
12 changes: 9 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@


def test_entry_version_arg() -> None:
"""Test the entry method with version argument."""
"""Test the entry method with the version argument."""
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0
assert "python-template version" in result.stdout


def test_entry_no_arg() -> None:
"""Test the entry method with no arguments."""
def test_entry_help() -> None:
"""Test the entry method with the help argument."""
result = runner.invoke(app, ["--help"])
assert result.exit_code == 0
assert "OPTIONS" in result.stdout


def test_entry_no_arg() -> None:
"""Test the entry method with no arguments."""
result = runner.invoke(app, [])
assert result.exit_code == 0