1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pytest 6, pytestCheckHook 7, pytest-describe 8, pytest-cov 9}: 10 11buildPythonPackage rec { 12 pname = "pytest-spec"; 13 version = "unstable-2023-06-04"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "pchomik"; 18 repo = "pytest-spec"; 19 rev = "e16e0550dd6bc557411e4312b7b42d53b26e69ef"; 20 hash = "sha256-dyDUdZJU4E4y1yCzunAX2c48Qv6ogu0b60U/5YbJvIU="; 21 }; 22 23 postPatch = '' 24 sed -i '/addopts/d' setup.cfg 25 # TODO: upstream 26 substituteInPlace pyproject.toml \ 27 --replace "poetry>=0.12" "poetry-core" \ 28 --replace "poetry.masonry.api" "poetry.core.masonry.api" 29 ''; 30 31 nativeBuildInputs = [ poetry-core ]; 32 33 buildInputs = [ pytest ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 pytest-describe 38 ]; 39 40 pytestFlagsArray = [ "--spec" ]; 41 42 pythonImportsCheck = [ "pytest_spec" ]; 43 44 meta = { 45 description = "A pytest plugin to display test execution output like a SPECIFICATION"; 46 homepage = "https://github.com/pchomik/pytest-spec"; 47 license = lib.licenses.gpl2Plus; 48 maintainers = with lib.maintainers; [ tomasajt ]; 49 }; 50}