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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=xml"
pythonpath = ["src"]

[tool.ruff]
line-length = 88
Expand Down
5 changes: 5 additions & 0 deletions src/my_python_project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
#
# Commercial use beyond a 30-day trial requires a separate license.
# Contact: gowtham.rao@coreason.ai


def add(a: int, b: int) -> int:
"""Adds two integers together."""
return a + b
7 changes: 5 additions & 2 deletions tests/test_example.py → tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# Commercial use beyond a 30-day trial requires a separate license.
# Contact: gowtham.rao@coreason.ai

from my_python_project import add

def test_always_passes():
assert True

def test_add():
"""Tests the add function."""
assert add(1, 2) == 3