1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest,
7 pytestCheckHook,
8 pytest-describe,
9}:
10
11buildPythonPackage {
12 pname = "pytest-spec";
13 version = "3.2.0-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-fail "poetry>=0.12" "poetry-core" \
28 --replace-fail "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 = "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}