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
6 changes: 6 additions & 0 deletions 1q
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
testpaths = tests
addopts = --cov=src --cov-report=term-missing
markers =
unit: unit tests
integration: integration tests
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,21 @@ cs = "commitsense.main:app"
[tool.setuptools.packages.find]
where = ["src"]

[dependency-groups]
dev = [
"pytest>=9.0.3",
"pytest-cov>=7.1.0",
]

[tool.setuptools]
include-package-data = true
include-package-data = true

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=term-missing"

[tool.coverage.run]
branch = true
source = ["src"]

[tool.coverage.report]
fail_under = 0
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
testpaths = tests
addopts = --cov=commitsense --cov-report=term-missing
markers =
unit: unit tests
integration: integration tests
Empty file added tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/fixtures/sample_diff.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- old line
+ new improved line
2 changes: 2 additions & 0 deletions tests/fixtures/sample_pr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Title: Fix login bug
Description: Resolves crash when user logs in
4 changes: 4 additions & 0 deletions tests/fixtures/sample_stacktrace.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Traceback (most recent call last):
File "main.py", line 10, in <module>
raise ValueError("Invalid input")
ValueError: Invalid input
Empty file added tests/integration/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def test_cli_runs():
assert True

def test_cli_dummy():
assert "cli" in "commitsense cli"
8 changes: 8 additions & 0 deletions tests/test_sensecommit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_commit_basic():
assert True

def test_commit_message():
assert isinstance("msg", str)

def test_commit_dummy():
assert len("commit") > 0
8 changes: 8 additions & 0 deletions tests/test_sensefix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_sensefix_basic():
assert True

def test_sensefix_example():
assert 1 + 1 == 2

def test_sensefix_dummy():
assert "fix" in "sensefix"
8 changes: 8 additions & 0 deletions tests/test_sensetriage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_triage_basic():
assert True

def test_triage_logic():
assert 2 > 1

def test_triage_dummy():
assert "triage".startswith("tri")
Empty file added tests/unit/__init__.py
Empty file.
565 changes: 565 additions & 0 deletions uv.lock

Large diffs are not rendered by default.