4d5a95770c
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, makefun
|
|
, decopatch
|
|
, pythonOlder
|
|
, pytest
|
|
, setuptools-scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-cases";
|
|
version = "3.6.14";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-dFXmylelRMG/3YtWrOCMHBzkxlcqiquPG9NR3CWhC2s=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
buildInputs = [
|
|
pytest
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
decopatch
|
|
makefun
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
# Tests have dependencies (pytest-harvest, pytest-steps) which
|
|
# are not available in Nixpkgs. Most of the packages (decopatch,
|
|
# makefun, pytest-*) have circular dependecies.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"pytest_cases"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Separate test code from test cases in pytest";
|
|
homepage = "https://github.com/smarie/python-pytest-cases";
|
|
changelog = "https://github.com/smarie/python-pytest-cases/releases/tag/${version}";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|