File tree 2 files changed +42
-0
lines changed
Filter options
2 files changed +42
-0
lines changed
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Use of this source code is governed by a BSD-style
6
+ # license that can be found in the LICENSE file or at
7
+ # https://developers.google.com/open-source/licenses/bsd
8
+
9
+ [run]
10
+ branch = True
11
+
12
+ [report]
13
+ fail_under = 100
14
+ show_missing = True
15
+ exclude_lines =
16
+ # Re-enable the standard pragma
17
+ pragma: NO COVER
18
+ # Ignore debug-only repr
19
+ def __repr__
20
+ # Ignore abstract methods
21
+ raise NotImplementedError
22
+ omit =
23
+ */site-packages/*.py
Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ def default(session):
69
69
session .run (
70
70
"py.test" ,
71
71
"--quiet" ,
72
+ "--cov=django_spanner" ,
73
+ "--cov=spanner_dbapi" ,
74
+ "--cov=tests.spanner_dbapi" ,
75
+ "--cov-append" ,
76
+ "--cov-config=.coveragerc" ,
77
+ "--cov-report=" ,
78
+ "--cov-fail-under=0" ,
72
79
os .path .join ("tests" , "spanner_dbapi" ),
73
80
* session .posargs
74
81
)
@@ -80,6 +87,18 @@ def unit(session):
80
87
default (session )
81
88
82
89
90
+ @nox .session (python = "3.8" )
91
+ def cover (session ):
92
+ """Run the final coverage report.
93
+
94
+ This outputs the coverage report aggregating coverage from the unit
95
+ test runs (not system test runs), and then erases coverage data.
96
+ """
97
+ session .install ("coverage" , "pytest-cov" )
98
+ session .run ("coverage" , "report" , "--show-missing" , "--fail-under=20" )
99
+ session .run ("coverage" , "erase" )
100
+
101
+
83
102
@nox .session (python = "3.8" )
84
103
def docs (session ):
85
104
"""Build the docs for this library."""
You can’t perform that action at this time.
0 commit comments