python3Packages.buildPythonPackage: default enabledTestPaths = [ "." ] (#425191)
This commit is contained in:
@@ -431,6 +431,17 @@ let
|
||||
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
|
||||
installCheckPhase = attrs.checkPhase;
|
||||
}
|
||||
// {
|
||||
# `pytest` defaults to discover tests in the current directory if no paths or test items are specified.
|
||||
# Provide an explicit default value to simplify overriding.
|
||||
enabledTestPaths =
|
||||
if attrs ? enabledTestPaths then
|
||||
lib.throwIf (!lib.isList attrs.enabledTestPaths || attrs.enabledTestPaths == [ ])
|
||||
"${lib.getName finalAttrs}: enabledTestPaths must be a non-empty list (default to [ \".\" ])."
|
||||
attrs.enabledTestPaths
|
||||
else
|
||||
[ "." ];
|
||||
}
|
||||
//
|
||||
lib.mapAttrs
|
||||
(
|
||||
@@ -442,7 +453,6 @@ let
|
||||
(
|
||||
getOptionalAttrs [
|
||||
"enabledTestMarks"
|
||||
"enabledTestPaths"
|
||||
"enabledTests"
|
||||
] attrs
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user