0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +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 { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pytest , pytestCheckHook
, pytest-cov
, mock , mock
, pyyaml , pyyaml
, six , six
@ -11,31 +10,37 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-multipart"; pname = "python-multipart";
version = "0.0.5"; version = "0.0.5";
format = "setuptools";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"; sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43";
}; };
checkInputs = [
pytest
pytest-cov
mock
pyyaml
];
propagatedBuildInputs = [ propagatedBuildInputs = [
six six
]; ];
checkPhase = '' pythonImportsCheck = [
pytest "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; { meta = with lib; {
description = "A streaming multipart parser for Python"; description = "A streaming multipart parser for Python";
homepage = "https://github.com/andrew-d/python-multipart"; homepage = "https://github.com/andrew-d/python-multipart";
license = licenses.asl20; license = licenses.asl20;
maintainers = [ maintainers.costrouc ]; maintainers = with maintainers; [ costrouc ];
}; };
} }