pythonPackages.tld: use pythonImportsCheck and pytestCheckHook

This commit is contained in:
Frederik Rietdijk 2019-08-31 13:57:57 +02:00
parent f7e28bf5d8
commit 9dd6537303

View File

@ -10,20 +10,25 @@ python.pkgs.buildPythonPackage rec {
};
propagatedBuildInputs = with python.pkgs; [ six ];
checkInputs = with python.pkgs; [ factory_boy faker pytest pytestcov tox ];
checkInputs = with python.pkgs; [ factory_boy faker pytestcov tox pytestCheckHook];
# https://github.com/barseghyanartur/tld/issues/54
disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) ([
disabledTests = [
"test_1_update_tld_names"
"test_1_update_tld_names_command"
"test_2_update_tld_names_module"
]);
];
checkPhase = ''
export PATH="$PATH:$out/bin"
py.test -k '${disabledTests}'
preCheck = ''
export PATH="$PATH:$out/bin"
'';
dontUseSetuptoolsCheck = true;
pythonImportsCheck = [
"tld"
];
meta = with stdenv.lib; {
homepage = https://github.com/barseghyanartur/tld;
description = "Extracts the top level domain (TLD) from the URL given";