1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
python,
pythonOlder,
pytestCheckHook,
assertpy,
mock,
path,
pyhamcrest,
pytest-html,
colorama,
cucumber-tag-expressions,
parse,
parse-type,
setuptools,
six,
}:
buildPythonPackage rec {
pname = "behave";
version = "1.2.7.dev5";
pyproject = true;
src = fetchFromGitHub {
owner = "behave";
repo = "behave";
rev = "v${version}";
hash = "sha256-G1o0a57MRczwjGLl/tEYC+yx3nxpk6+E58RvR9kVJpA=";
};
build-system = [ setuptools ];
nativeCheckInputs = [
pytestCheckHook
assertpy
mock
path
pyhamcrest
pytest-html
];
doCheck = pythonOlder "3.12";
pythonImportsCheck = [ "behave" ];
dependencies = [
colorama
cucumber-tag-expressions
parse
parse-type
six
];
postPatch = ''
patchShebangs bin
'';
# timing-based test flaky on Darwin
# https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
"test_step_decorator_async_run_until_complete"
];
postCheck = ''
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/
'';
meta = with lib; {
changelog = "https://github.com/behave/behave/blob/${src.rev}/CHANGES.rst";
homepage = "https://github.com/behave/behave";
description = "behaviour-driven development, Python style";
mainProgram = "behave";
license = licenses.bsd2;
maintainers = with maintainers; [
alunduil
maxxk
];
};
}
|