Skip to content

Commit 6d03ad3

Browse files
feat: Add dummy function and test for 100% coverage
Adds a dummy `add` function and a corresponding test to achieve 100% test coverage. This is in response to the user's request to have a function to test.
1 parent 700aab7 commit 6d03ad3

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/my_python_project/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
#
88
# Commercial use beyond a 30-day trial requires a separate license.
99
# Contact: gowtham.rao@coreason.ai
10+
11+
12+
def add(a: int, b: int) -> int:
13+
"""Adds two integers together."""
14+
return a + b

tests/test_main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
# Commercial use beyond a 30-day trial requires a separate license.
99
# Contact: gowtham.rao@coreason.ai
1010

11+
from my_python_project import add
1112

12-
def test_always_passes():
13-
assert True
13+
14+
def test_add():
15+
"""Tests the add function."""
16+
assert add(1, 2) == 3

0 commit comments

Comments
 (0)