python3Packages.voluptuous-serialize: enable tests

This commit is contained in:
Fabian Affolter 2021-01-17 09:56:40 +01:00
parent 495066a47f
commit 9bf0304ee9

View File

@ -1,4 +1,10 @@
{ lib, stdenv, buildPythonPackage, isPy3k, fetchPypi, voluptuous, pytest }: { lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytestCheckHook
, voluptuous
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "voluptuous-serialize"; pname = "voluptuous-serialize";
@ -6,28 +12,24 @@ buildPythonPackage rec {
disabled = !isPy3k; disabled = !isPy3k;
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "home-assistant-libs";
sha256 = "1r7avibzf009h5rlh7mbh1fc01daligvi2axjn5qxh810g5igfn6"; repo = pname;
rev = version;
sha256 = "1km2y1xaagkdvsy3bmi1sc040x5yyfdw6llmwdv9z8nz67m9v1ya";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [ voluptuous ];
checkInputs = [
pytestCheckHook
voluptuous voluptuous
]; ];
checkInputs = [ pythonImportsCheck = [ "voluptuous_serialize" ];
pytest
];
checkPhase = ''
py.test
'';
# no tests in PyPI tarball
doCheck = false;
meta = with lib; { meta = with lib; {
homepage = "https://github.com/balloob/voluptuous-serialize"; homepage = "https://github.com/home-assistant-libs/voluptuous-serialize";
license = licenses.asl20; license = licenses.asl20;
description = "Convert Voluptuous schemas to dictionaries so they can be serialized"; description = "Convert Voluptuous schemas to dictionaries so they can be serialized";
maintainers = with maintainers; [ etu ]; maintainers = with maintainers; [ etu ];