2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-describe,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildPythonPackage {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "pytest-spec";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.2.0-unstable-2023-06-04";
|
2023-10-09 19:29:22 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pchomik";
|
|
|
|
repo = "pytest-spec";
|
|
|
|
rev = "e16e0550dd6bc557411e4312b7b42d53b26e69ef";
|
|
|
|
hash = "sha256-dyDUdZJU4E4y1yCzunAX2c48Qv6ogu0b60U/5YbJvIU=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/addopts/d' setup.cfg
|
|
|
|
# TODO: upstream
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "poetry>=0.12" "poetry-core" \
|
|
|
|
--replace-fail "poetry.masonry.api" "poetry.core.masonry.api"
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
|
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-describe
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "--spec" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pytest_spec" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A pytest plugin to display test execution output like a SPECIFICATION";
|
|
|
|
homepage = "https://github.com/pchomik/pytest-spec";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
|
|
};
|
|
|
|
}
|