depot/third_party/nixpkgs/pkgs/development/python-modules/chai/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

28 lines
609 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
pname = "chai";
version = "1.1.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "ff8d2b6855f660cd23cd5ec79bd10264d39f24f6235773331b48e7fcd637d6cc";
};
postPatch = ''
# python 3.12 compatibility
substituteInPlace tests/*.py \
--replace "assertEquals" "assertEqual" \
--replace "assertNotEquals" "assertNotEqual" \
--replace "assert_equals" "assert_equal"
'';
meta = with lib; {
description = "Mocking, stubbing and spying framework for python";
};
}