Skip to content

Commit 6938d79

Browse files
Add coverage config
1 parent c45514d commit 6938d79

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,20 @@ pytest = "^8.3.3"
1414
coverage = "^7.6.1"
1515

1616
[tool.coverage.run]
17+
branch = true
18+
source = ["src"]
1719
dynamic_context = "test_function"
1820

21+
22+
[tool.coverage.report]
23+
show_missing = true
24+
fail_under = 80
25+
# omit = ["tests/*", "your_module_name/__init__.py"]
26+
27+
[tool.coverage.html]
28+
directory = "htmlcov"
29+
30+
1931
[build-system]
2032
requires = ["poetry-core"]
2133
build-backend = "poetry.core.masonry.api"

src/string_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class StringOperations:
1+
class StringOperations: # pragma: no cover
22

33
def capitalize(self, text: str) -> str:
44
return text.capitalize()

0 commit comments

Comments
 (0)