2021-05-10 22:08:04 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
|
2019-11-01 21:23:04 +00:00
|
|
|
, execnet
|
|
|
|
, glob2
|
|
|
|
, Mako
|
|
|
|
, mock
|
|
|
|
, parse
|
|
|
|
, parse-type
|
|
|
|
, py
|
|
|
|
, pytest
|
2021-05-10 22:08:04 +00:00
|
|
|
, pytestCheckHook
|
2019-11-01 21:23:04 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-bdd";
|
2021-05-10 22:08:04 +00:00
|
|
|
version = "4.0.2";
|
2019-11-01 21:23:04 +00:00
|
|
|
|
|
|
|
# tests are not included in pypi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-10 22:08:04 +00:00
|
|
|
sha256 = "0pxx4c8lm68rw0jshbr09fnadg8zz8j73q0qi49yw9s7yw86bg5l";
|
2019-11-01 21:23:04 +00:00
|
|
|
};
|
|
|
|
|
2021-05-10 22:08:04 +00:00
|
|
|
patches = [
|
|
|
|
# Fixed compatibility with pytest > 6.1
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pytest-dev/pytest-bdd/commit/e1dc0cad9a1c1ba563ccfbc24f9993d83ac59293.patch";
|
|
|
|
sha256 = "1p3gavh6nir2a8crd5wdf0prfrg0hmgar9slvn8a21ils3k5pm5y";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
|
2021-03-12 22:20:19 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ glob2 Mako parse parse-type py six ];
|
2019-11-01 21:23:04 +00:00
|
|
|
|
2021-05-10 22:08:04 +00:00
|
|
|
checkInputs = [ pytestCheckHook execnet mock ];
|
|
|
|
preCheck = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
2019-11-01 21:23:04 +00:00
|
|
|
'';
|
2020-08-25 02:07:09 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-01 21:23:04 +00:00
|
|
|
description = "BDD library for the py.test runner";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/pytest-dev/pytest-bdd";
|
2019-11-01 21:23:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jm2dev ];
|
|
|
|
};
|
|
|
|
}
|