summary refs log tree commit diff
path: root/pkgs/development/python-modules/tornado/4.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/tornado/4.nix')
-rw-r--r--pkgs/development/python-modules/tornado/4.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/tornado/4.nix b/pkgs/development/python-modules/tornado/4.nix
index 3be82e40a29..5765dee4415 100644
--- a/pkgs/development/python-modules/tornado/4.nix
+++ b/pkgs/development/python-modules/tornado/4.nix
@@ -1,26 +1,27 @@
 { lib
-, python
+, unittestCheckHook
 , buildPythonPackage
 , fetchPypi
 , isPy27
+, pythonAtLeast
 }:
 
 buildPythonPackage rec {
   pname = "tornado";
   version = "4.5.3";
-  disabled = isPy27 || python.pythonAtLeast "3.10";
-
-  # We specify the name of the test files to prevent
-  # https://github.com/NixOS/nixpkgs/issues/14634
-  checkPhase = ''
-    ${python.interpreter} -m unittest discover *_test.py
-  '';
+  disabled = isPy27 || pythonAtLeast "3.10";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d";
   };
 
+  checkInputs = [ unittestCheckHook ];
+
+  # We specify the name of the test files to prevent
+  # https://github.com/NixOS/nixpkgs/issues/14634
+  unittestFlagsArray = [ "*_test.py" ];
+
   __darwinAllowLocalNetworking = true;
 
   meta = {