diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2021-08-15 01:14:35 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2021-08-15 01:14:35 +0200 |
commit | 914648f99c78fa6ed10f5476159f24d5eddab187 (patch) | |
tree | 8b2b65023994f56a7d0ae739118a3da7a858e0f3 /pkgs/development/python-modules/howdoi | |
parent | 757d12a40cda9a575d0f7e9ad83707fc46090940 (diff) | |
download | nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar.gz nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar.bz2 nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar.lz nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar.xz nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.tar.zst nixpkgs-914648f99c78fa6ed10f5476159f24d5eddab187.zip |
python3Packages.howdoi: enable tests
Diffstat (limited to 'pkgs/development/python-modules/howdoi')
-rw-r--r-- | pkgs/development/python-modules/howdoi/default.nix | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/howdoi/default.nix b/pkgs/development/python-modules/howdoi/default.nix index fb67c1b37cf..8cd90765ec1 100644 --- a/pkgs/development/python-modules/howdoi/default.nix +++ b/pkgs/development/python-modules/howdoi/default.nix @@ -1,39 +1,61 @@ { lib +, appdirs , buildPythonPackage -, fetchPypi -, six -, pygments -, pyquery , cachelib -, appdirs +, cssselect +, fetchFromGitHub , keep +, lxml +, pygments +, pyquery +, requests +, six +, pytestCheckHook }: buildPythonPackage rec { pname = "howdoi"; version = "2.0.17"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-ea7KIDYgDWCi1skZKlbzhHASfwHqwbfvWDuNOxGRhek="; + src = fetchFromGitHub { + owner = "gleitz"; + repo = pname; + rev = "v${version}"; + sha256 = "1cc9hbnalbsd5la9wsm8s6drb79vlzin9qnv86ic81r5nq27n180"; }; - propagatedBuildInputs = [ six pygments pyquery cachelib appdirs keep ]; + propagatedBuildInputs = [ + appdirs + cachelib + cssselect + keep + lxml + pygments + pyquery + requests + six + ]; + + checkInputs = [ + pytestCheckHook + ]; - # author hasn't included page_cache directory (which allows tests to run without - # external requests) in pypi tarball. github repo doesn't have release revisions - # clearly tagged. re-enable tests when either is sorted. - doCheck = false; preCheck = '' - mv howdoi _howdoi export HOME=$(mktemp -d) ''; + + disabledTests = [ + # AssertionError: "The... + "test_get_text_with_one_link" + "test_get_text_without_links" + ]; + pythonImportsCheck = [ "howdoi" ]; meta = with lib; { description = "Instant coding answers via the command line"; homepage = "https://pypi.python.org/pypi/howdoi"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } |