Skip to content

Commit a655bdf

Browse files
committed
Exclude init files from test coverage
1 parent e099de9 commit a655bdf

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

packages/createIndexFunction/pytest.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
testpaths = tests
33
python_files = test_*.py
44
python_functions = test_*
5-
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing
5+
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing --cov-config=pytest.ini
6+
7+
[coverage:run]
8+
omit = */__init__.py

packages/slackBotFunction/pytest.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
testpaths = tests
33
python_files = test_*.py
44
python_functions = test_*
5-
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing
5+
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing --cov-config=pytest.ini
6+
7+
[coverage:run]
8+
omit = */__init__.py

packages/syncKnowledgeBaseFunction/pytest.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
testpaths = tests
33
python_files = test_*.py
44
python_functions = test_*
5-
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing
5+
addopts = -v --tb=short --cov=app --cov-report=xml:coverage/coverage.xml --cov-report=term-missing --cov-config=pytest.ini
6+
7+
[coverage:run]
8+
omit = */__init__.py

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sonar.coverage.exclusions=\
1010
**/scripts/*, \
1111
**/jest.config.ts, \
1212
**/jest.debug.config.ts, \
13+
**/__init__.py, \
1314
eslint.config.mjs, \
1415
packages/cdk/**, \
1516
release.config.js

0 commit comments

Comments
 (0)