python310Packages.swagger-spec-validator: switch to pytestCheckHook, add imports check

This commit is contained in:
Sandro Jäckel 2022-05-30 04:49:22 +02:00
parent 260ed44242
commit 3f2838e5f5
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytest, mock }: { lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytestCheckHook, mock }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "swagger-spec-validator"; pname = "swagger-spec-validator";
@ -7,25 +7,23 @@ buildPythonPackage rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Yelp"; owner = "Yelp";
repo = "swagger_spec_validator"; repo = "swagger_spec_validator";
rev = "v" + version; rev = "v${version}";
sha256 = "sha256-7+kFmtzeze0QlGf6z/M4J4F7z771a5NWewB1S3+bxn4="; sha256 = "sha256-7+kFmtzeze0QlGf6z/M4J4F7z771a5NWewB1S3+bxn4=";
}; };
checkInputs = [
pytest
mock
];
checkPhase = ''
pytest tests
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
pyyaml pyyaml
jsonschema jsonschema
six six
]; ];
checkInputs = [
pytestCheckHook
mock
];
pythonImportsCheck = [ "swagger_spec_validator" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/Yelp/swagger_spec_validator"; homepage = "https://github.com/Yelp/swagger_spec_validator";
license = licenses.asl20; license = licenses.asl20;
@ -33,5 +31,3 @@ buildPythonPackage rec {
maintainers = with maintainers; [ vanschelven ]; maintainers = with maintainers; [ vanschelven ];
}; };
} }