summary refs log tree commit diff
path: root/pkgs/development/python-modules/tld
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-05-01 23:56:49 +0200
committerFlorian Klink <flokli@flokli.de>2019-05-02 00:35:09 +0200
commit7a22dc48156a8db600240cdfd617f1ca1667a1b6 (patch)
treec99fb364280d567df2a59303c7cff369cf363b83 /pkgs/development/python-modules/tld
parent3a1792e7a14a1a74615c19c7fcf262e39b715a26 (diff)
downloadnixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar.gz
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar.bz2
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar.lz
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar.xz
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.tar.zst
nixpkgs-7a22dc48156a8db600240cdfd617f1ca1667a1b6.zip
pythonPackages.tld: enable tests
Diffstat (limited to 'pkgs/development/python-modules/tld')
-rw-r--r--pkgs/development/python-modules/tld/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/tld/default.nix b/pkgs/development/python-modules/tld/default.nix
index 85991af4ba1..3a21ce57fe7 100644
--- a/pkgs/development/python-modules/tld/default.nix
+++ b/pkgs/development/python-modules/tld/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchPypi, buildPythonPackage, six }:
+{ stdenv, fetchPypi, python }:
 
-buildPythonPackage rec {
+python.pkgs.buildPythonPackage rec {
   pname   = "tld";
   version = "0.9.3";
 
@@ -9,8 +9,20 @@ buildPythonPackage rec {
     sha256 = "0i0prgwrmm157h6fa5bx9wm0m70qq2nhzp743374a94p9s766rpp";
   };
 
-  doCheck = false;
-  propagatedBuildInputs = [ six ];
+  propagatedBuildInputs = with python.pkgs; [ six ];
+  checkInputs = with python.pkgs; [ factory_boy faker pytest pytestcov tox ];
+
+  # https://github.com/barseghyanartur/tld/issues/54
+  disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) ([
+    "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}'
+  '';
 
   meta = with stdenv.lib; {
     homepage = https://github.com/barseghyanartur/tld;