python3Packages.pyipp: switch to pytestCheckHook and exclude tests

This commit is contained in:
Fabian Affolter 2021-01-15 08:10:35 +01:00
parent 66a81b872f
commit ac8a17dd56

View File

@ -1,11 +1,18 @@
{ lib, buildPythonPackage, fetchFromGitHub, isPy27 { lib
, aiohttp, deepmerge, yarl , aiohttp
, aresponses, pytest, pytest-asyncio, pytestcov }: , aresponses
, buildPythonPackage
, deepmerge
, fetchFromGitHub
, pytest-asyncio
, pytestCheckHook
, pytestcov
, yarl
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyipp"; pname = "pyipp";
version = "0.11.0"; version = "0.11.0";
disabled = isPy27;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ctalkington"; owner = "ctalkington";
@ -22,14 +29,26 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
aresponses aresponses
pytest
pytest-asyncio pytest-asyncio
pytestcov pytestcov
pytestCheckHook
]; ];
checkPhase = '' # Some tests are failing due to encoding issues
pytest -q . # https://github.com/ctalkington/python-ipp/issues/121
''; disabledTests = [
"test_internal_session"
"test_request_port"
"est_http_error426"
"test_unexpected_response"
"test_printer"
"test_raw"
"test_ipp_request"
"test_request_tls"
"test_ipp_error_0x0503"
];
pythonImportsCheck = [ "pyipp" ];
meta = with lib; { meta = with lib; {
description = "Asynchronous Python client for Internet Printing Protocol (IPP)"; description = "Asynchronous Python client for Internet Printing Protocol (IPP)";