python3Packages.pytestCheckHook: Make disabledTests support sub-expressions
Wrap each elements of disabledTests with parenthesis
so that when __structuredAttrs = true,
people could use sub-expressions an element.
E.g.
```nix
{
disabledTests = [
"ClassFoo and test_foo"
"test_bar"
];
}
This commit is contained in:
@@ -170,6 +170,14 @@ in
|
||||
"test_print"
|
||||
] ++ previousPythonAttrs.disabledTests or [ ];
|
||||
});
|
||||
disabledTests-expression = objprint.overridePythonAttrs (previousPythonAttrs: {
|
||||
__structuredAttrs = true;
|
||||
pname = "test-pytestCheckHook-disabledTests-expression-${previousPythonAttrs.pname}";
|
||||
disabledTests = [
|
||||
"TestBasic and test_print"
|
||||
"test_str"
|
||||
] ++ previousPythonAttrs.disabledTests or [ ];
|
||||
});
|
||||
disabledTestPaths = objprint.overridePythonAttrs (previousPythonAttrs: {
|
||||
pname = "test-pytestCheckHook-disabledTestPaths-${previousPythonAttrs.pname}";
|
||||
disabledTestPaths = [
|
||||
|
||||
@@ -57,7 +57,8 @@ EOF
|
||||
done
|
||||
|
||||
if [ -n "${disabledTests[*]-}" ]; then
|
||||
disabledTestsString="not $(concatStringsSep " and not " disabledTests)"
|
||||
# not (keyword1) and not (keyword2)
|
||||
disabledTestsString="not ($(concatStringsSep ") and not (" disabledTests))"
|
||||
flagsArray+=(-k "$disabledTestsString")
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user