Skip to content

Commit 7b565a4

Browse files
committed
added no-fail .coveragerc to sqlalchemy-spanner
1 parent ae05642 commit 7b565a4

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2026 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
[run]
18+
branch = True
19+
omit =
20+
google/__init__.py
21+
google/cloud/sqlalchemy_spanner/requirements.py
22+
23+
[report]
24+
fail_under = 0
25+
show_missing = True
26+
exclude_lines =
27+
# Re-enable the standard pragma
28+
pragma: NO COVER
29+
# Ignore debug-only repr
30+
def __repr__
31+
# Ignore abstract methods
32+
raise NotImplementedError
33+
omit =
34+
*/site-packages/*.py
35+
google/__init__.py
36+
google/cloud/sqlalchemy_spanner/requirements.py

packages/sqlalchemy-spanner/noxfile.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class = StreamHandler
8585
UNIT_TEST_STANDARD_DEPENDENCIES = [
8686
"mock",
8787
"pytest",
88+
"pytest-cov",
8889
]
8990

9091
UNIT_TEST_EXTERNAL_DEPENDENCIES = [
@@ -368,7 +369,18 @@ def unit(session, test_type):
368369
*UNIT_TEST_DEPENDENCIES,
369370
)
370371
session.install(".")
371-
session.run("py.test", "--quiet", os.path.join("tests/unit"), *session.posargs)
372+
session.run(
373+
"py.test",
374+
"--quiet",
375+
"--cov=google.cloud.sqlalchemy_spanner",
376+
"--cov=tests/unit",
377+
"--cov-append",
378+
"--cov-config=.coveragerc",
379+
"--cov-report=",
380+
"--cov-fail-under=0",
381+
os.path.join("tests/unit"),
382+
*session.posargs,
383+
)
372384
return
373385

374386

0 commit comments

Comments
 (0)