Skip to content

Commit

Permalink
added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adnaniazi committed Aug 16, 2023
1 parent d74323d commit 9fdb78e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ venv.bak/
.idea/

# MacOSX
*.DS_Store
*.DS_Store
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ Or if you want e.g. want to run all checks manually for all files:
```sh
pre-commit run --all-files
```

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ addopts = """\
"""

[tool.coverage.report]
fail_under = 100
fail_under = 80
exclude_lines = [
'if TYPE_CHECKING:',
'pragma: no cover'
Expand Down
8 changes: 6 additions & 2 deletions tests/test_add.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import pytest
from capfinder.add import add


def test_add_function()-> None:
def test_add_function() -> None:
result = add(1, 2, 3)
assert result == 6, "Incorrect sum"
result = add(1, 3, 3)
assert result == 7, "Incorrect sum"
# more test for 100% coverage
result = add(1, 3, 5)
assert result == 9


if __name__ == "__main__":
Expand Down

0 comments on commit 9fdb78e

Please sign in to comment.