python3Packages.aresponses: use GitHub as source and enable tests

This commit is contained in:
Fabian Affolter 2021-01-11 12:16:08 +01:00
parent 9ecc4fccb5
commit 66a81b872f
1 changed files with 23 additions and 11 deletions

View File

@ -1,12 +1,11 @@
{ lib { lib
, buildPythonPackage
, fetchPypi
# propagatedBuildInputs
, aiohttp , aiohttp
# buildInputs , buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytest , pytest
, pytest-asyncio , pytest-asyncio
, isPy3k , pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -15,9 +14,11 @@ buildPythonPackage rec {
disabled = !isPy3k; disabled = !isPy3k;
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "CircleUp";
sha256 = "1jn7x7ldqsz5cd190jqjil0kqyimd1d0yxfzzp41ky0p72lvd68a"; repo = pname;
rev = version;
sha256 = "0dc1y4s6kpmr0ar63kkyghvisgbmb8qq5wglmjclrpzd5180mjcl";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -29,13 +30,24 @@ buildPythonPackage rec {
pytest-asyncio pytest-asyncio
]; ];
# tests only distributed via git repository, not pypi checkInputs = [
doCheck = false; aiohttp
pytestCheckHook
pytest-asyncio
];
# Disable tests which requires network access
disabledTests = [
"test_foo"
"test_passthrough"
];
pythonImportsCheck = [ "aresponses" ];
meta = with lib; { meta = with lib; {
description = "Asyncio testing server"; description = "Asyncio testing server";
homepage = "https://github.com/circleup/aresponses"; homepage = "https://github.com/circleup/aresponses";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.makefu ]; maintainers = with maintainers; [ makefu ];
}; };
} }