File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -229,15 +229,23 @@ def pinned_requirements(path: Path) -> Iterator[Tuple[str, str]]:
229
229
230
230
@nox .session
231
231
def coverage (session : nox .Session ) -> None :
232
- if not os .path .exists ("./.coverage-output" ):
233
- os .mkdir ("./.coverage-output" )
232
+ # Install source distribution
233
+ run_with_protected_pip (session , "install" , "." )
234
+
235
+ # Install test dependencies
236
+ run_with_protected_pip (session , "install" , "-r" , REQUIREMENTS ["tests" ])
237
+
238
+ if not os .path .exists (".coverage-output" ):
239
+ os .mkdir (".coverage-output" )
234
240
session .run (
235
241
"pytest" ,
236
242
"--cov=pip" ,
237
243
"--cov-config=./setup.cfg" ,
244
+ * session .posargs ,
238
245
env = {
239
246
"COVERAGE_OUTPUT_DIR" : "./.coverage-output" ,
240
- "COVERAGE_PROCESS_START" : "./setup.cfg" ,
247
+ "COVERAGE_PROCESS_START" : os .fsdecode (Path ("setup.cfg" ).resolve ()),
248
+ "SETUPTOOLS_USE_DISTUTILS" : "stdlib" ,
241
249
},
242
250
)
243
251
You can’t perform that action at this time.
0 commit comments