2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonApplication, python
|
|
|
|
, pytestCheckHook, mock, pathpy, pyhamcrest, pytest-html
|
|
|
|
, glibcLocales
|
|
|
|
, colorama, cucumber-tag-expressions, parse, parse-type, six
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "behave";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.2.7.dev1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "behave";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ssgixmqlg8sxsyalr83a1970njc2wg3zl8idsmxnsljwacv7qwv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
# upstream tests are failing, so instead we only check if we can import it
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "behave" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ glibcLocales ];
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [ colorama cucumber-tag-expressions parse parse-type six ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs bin
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# timing-based test flaky on Darwin
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export LANG="en_US.UTF-8"
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
|
|
|
|
${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/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/behave/behave";
|
|
|
|
description = "behaviour-driven development, Python style";
|
|
|
|
license = licenses.bsd2;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ alunduil maxxk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|