python3Packages.asyncwhois: enable tests

This commit is contained in:
Fabian Affolter 2021-02-13 23:52:06 +01:00
parent 4c9e23d6ad
commit 715292c1e5

View file

@ -1,20 +1,23 @@
{ lib { lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, aiodns , aiodns
, tldextract , asynctest
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook , pytestCheckHook
, pythonOlder
, tldextract
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "asyncwhois"; pname = "asyncwhois";
version = "0.2.4"; version = "0.2.4";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "pogzyb";
sha256 = "84677e90bc2d2975788e905ae9841bc91a732a452bc870991105b0a6cc3cd22f"; repo = pname;
rev = "v${version}";
sha256 = "17w007hjnpggj6jvkv8wxwllxk6mir1q2nhw0dqg7glm4lfbx8kr";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -22,9 +25,24 @@ buildPythonPackage rec {
tldextract tldextract
]; ];
# tests are only present at GitHub but not the released source tarballs checkInputs = [
# https://github.com/pogzyb/asyncwhois/issues/10 asynctest
doCheck = false; pytestCheckHook
];
# Disable tests that require network access
disabledTests = [
"test_pywhois_aio_get_hostname_from_ip"
"test_pywhois_get_hostname_from_ip"
"test_pywhois_aio_lookup_ipv4"
"test_not_found"
"test_aio_from_whois_cmd"
"test_aio_get_hostname_from_ip"
"test_from_whois_cmd"
"test_get_hostname_from_ip"
"test_whois_query_run"
];
pythonImportsCheck = [ "asyncwhois" ]; pythonImportsCheck = [ "asyncwhois" ];
meta = with lib; { meta = with lib; {