Skip to content

Commit 0c11d7a

Browse files
committed
ci: add unit-test markers
1 parent c767f1e commit 0c11d7a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

backend/kernelCI_app/tests/unitTests/filters_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import pytest
12
from kernelCI_app.helpers.filters import should_filter_test_issue
23
from kernelCI_app.constants.general import UNCATEGORIZED_STRING
34

45

6+
@pytest.mark.unit
57
class TestShouldFilterTestIssue:
68
def test_no_issue_filters(self):
79
assert not should_filter_test_issue(

backend/kernelCI_app/tests/unitTests/issue_listing_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from kernelCI_app.helpers.issueListing import (
23
should_discard_issue_by_category,
34
should_discard_issue_by_culprit,
@@ -6,6 +7,7 @@
67
from kernelCI_app.typeModels.issues import CULPRIT_CODE
78

89

10+
@pytest.mark.unit
911
class TestShouldDiscardIssue:
1012
def test_discard_by_culprit(self):
1113
assert (

backend/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ pytest-rerunfailures = "^15.0"
3636
[tool.pytest.ini_options]
3737
DJANGO_SETTINGS_MODULE = "kernelCI.settings"
3838
addopts = "-n 4 --dist loadscope --reruns 4 -x"
39+
markers = [
40+
"unit: marks tests as unit tests (fast, no external dependencies)"
41+
]
3942

4043
[build-system]
4144
requires = ["poetry-core"]

0 commit comments

Comments
 (0)