git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.asyncwhois: enable tests
commit715292c1e5b7a88bfdc01c746f446f9ab4e0b907 authorFabian Affolter <mail@fabian-affolter.ch> dateSat 13 Feb 2021, 23:52 (6 years ago) parent4c9e23d
1 file changed+28−10
pkgs/development/python-modules/asyncwhois/default.nix+28−10
pkgs/development/python-modules/asyncwhois/default.nix+28−10
@@ -1,20 +1,23 @@
11{ lib
2+, aiodns
3+, asynctest
24, buildPythonPackage
3−, fetchPypi
5+, fetchFromGitHub
6+, pytestCheckHook
47, pythonOlder
5−, aiodns
68, tldextract
7−, pytestCheckHook
89}:
910
1011buildPythonPackage rec {
1112 pname = "asyncwhois";
1213 version = "0.2.4";
13− disabled = pythonOlder "3.6";
14+ disabled = pythonOlder "3.7";
1415
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "84677e90bc2d2975788e905ae9841bc91a732a452bc870991105b0a6cc3cd22f";
16+ src = fetchFromGitHub {
17+ owner = "pogzyb";
18+ repo = pname;
19+ rev = "v${version}";
20+ sha256 = "17w007hjnpggj6jvkv8wxwllxk6mir1q2nhw0dqg7glm4lfbx8kr";
1821 };
1922
2023 propagatedBuildInputs = [
@@ -22,9 +25,24 @@ buildPythonPackage rec {
2225 tldextract
2326 ];
2427
25− # tests are only present at GitHub but not the released source tarballs
26− # https://github.com/pogzyb/asyncwhois/issues/10
27− doCheck = false;
28+ checkInputs = [
29+ asynctest
30+ pytestCheckHook
31+ ];
32+
33+ # Disable tests that require network access
34+ disabledTests = [
35+ "test_pywhois_aio_get_hostname_from_ip"
36+ "test_pywhois_get_hostname_from_ip"
37+ "test_pywhois_aio_lookup_ipv4"
38+ "test_not_found"
39+ "test_aio_from_whois_cmd"
40+ "test_aio_get_hostname_from_ip"
41+ "test_from_whois_cmd"
42+ "test_get_hostname_from_ip"
43+ "test_whois_query_run"
44+ ];
45+
2846 pythonImportsCheck = [ "asyncwhois" ];
2947
3048 meta = with lib; {