0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

python3Packages.python-multipart: fix tests

This commit is contained in:
Martin Weinelt 2022-01-03 22:04:10 +01:00
parent 741668e4b0
commit 033686d737
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,8 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytest-cov
, pytestCheckHook
, mock
, pyyaml
, six
@ -11,31 +10,37 @@
buildPythonPackage rec {
pname = "python-multipart";
version = "0.0.5";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43";
};
checkInputs = [
pytest
pytest-cov
mock
pyyaml
];
propagatedBuildInputs = [
six
];
checkPhase = ''
pytest
pythonImportsCheck = [
"multipart"
];
preCheck = ''
# https://github.com/andrew-d/python-multipart/issues/41
substituteInPlace multipart/tests/test_multipart.py \
--replace "yaml.load" "yaml.safe_load"
'';
checkInputs = [
pytestCheckHook
mock
pyyaml
];
meta = with lib; {
description = "A streaming multipart parser for Python";
homepage = "https://github.com/andrew-d/python-multipart";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ costrouc ];
};
}