
This treewide change targets Python packages that specifies pytest flags with pytestFlagsArray, and whose flags cannot be consructed by other pytestCheckHook-honoured arguments. Use the __structuredAttrs-agnostic argument pytestFlags instead of the deprecated pytestFlagsArray. For flags with option arguments, join each flag and their option argument into a single command-line argument following POSIX Utility Argument Syntax[1] for easier overriding (remove/replace). Examples: * [ "-W" "ignore:message:WarningClass" ] -> [ "-Wignore:message:WarningClass" ] * [ "--reruns" "3" ] -> [ "--reruns=3" ] [1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
pythonOlder,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
pytest,
|
|
pytestCheckHook,
|
|
docutils,
|
|
pygments,
|
|
pytest-rerunfailures,
|
|
pytest-asyncio,
|
|
anyio,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-subprocess";
|
|
version = "1.5.3";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aklajnert";
|
|
repo = "pytest-subprocess";
|
|
tag = version;
|
|
hash = "sha256-3vBYOk/P78NOjAbs3fT6py5QOOK3fX+AKtO4j5vxZfk=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [ pytest ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
docutils
|
|
pygments
|
|
pytest-rerunfailures
|
|
pytest-asyncio
|
|
anyio
|
|
typing-extensions
|
|
];
|
|
|
|
pytestFlags = [ "-Wignore::DeprecationWarning" ];
|
|
|
|
meta = with lib; {
|
|
description = "Plugin to fake subprocess for pytest";
|
|
homepage = "https://github.com/aklajnert/pytest-subprocess";
|
|
changelog = "https://github.com/aklajnert/pytest-subprocess/blob/${src.tag}/HISTORY.rst";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|