about summary refs log tree commit diff
path: root/pkgs/development/python-modules/hypothesis
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-02-14 04:07:19 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2021-02-26 11:01:59 +0100
commit701b8560a9e358f0b766c872b177122928c4bc4d (patch)
tree988a8edc9fc18e291e6cde6db2d7d425c585ccdc /pkgs/development/python-modules/hypothesis
parent6cd9fe299cc4500eae556835638917ba81e403aa (diff)
pythonPackages.hypothesis: 5.30.0 -> 5.49.0
A newer version is required for hypothesmith so I just updated to the latest 5.X.X version.
Diffstat (limited to 'pkgs/development/python-modules/hypothesis')
-rw-r--r--pkgs/development/python-modules/hypothesis/default.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix
index dac4ca43fc91b..e956cb9cc46fc 100644
--- a/pkgs/development/python-modules/hypothesis/default.nix
+++ b/pkgs/development/python-modules/hypothesis/default.nix
@@ -1,7 +1,14 @@
-{ lib, buildPythonPackage, fetchFromGitHub
-, isPy3k, attrs, coverage, enum34, pexpect
-, doCheck ? true, pytest, pytest_xdist, flaky, mock
+{ lib
+, buildPythonPackage
+, pythonAtLeast
+, fetchFromGitHub
+, attrs
+, pexpect
+, doCheck ? true
+, pytestCheckHook
+, pytest-xdist
 , sortedcontainers
+, tzdata
 }:
 buildPythonPackage rec {
   # https://hypothesis.readthedocs.org/en/latest/packaging.html
@@ -10,36 +17,40 @@ buildPythonPackage rec {
   # pytz fake_factory django numpy pytest
   # If you need these, you can just add them to your environment.
 
-  version = "5.30.0";
   pname = "hypothesis";
+  version = "5.49.0";
 
   # Use github tarballs that includes tests
   src = fetchFromGitHub {
     owner = "HypothesisWorks";
     repo = "hypothesis-python";
     rev = "hypothesis-python-${version}";
-    sha256 = "0fmc4jfaksr285fjhp18ibj2rr8cxmbd0pwx370r5wf8jnhm6jb3";
+    sha256 = "1lr9a93vdx70s9i1zazazif5hy8fbqhvwqq402ygpf53yw4lgi2w";
   };
 
   postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";
 
   propagatedBuildInputs = [
     attrs
-    coverage
     sortedcontainers
-  ] ++ lib.optional (!isPy3k) enum34;
+  ];
+
+  checkInputs = [ pytestCheckHook pytest-xdist pexpect ]
+    ++ lib.optional (pythonAtLeast "3.9") tzdata;
 
-  checkInputs = [ pytest pytest_xdist flaky mock pexpect ];
   inherit doCheck;
 
-  checkPhase = ''
-    rm tox.ini # This file changes how py.test runs and breaks it
-    py.test tests/cover
+  # This file changes how pytest runs and breaks it
+  preCheck = ''
+    rm tox.ini
   '';
 
+  pytestFlagsArray = [ "tests/cover" ];
+
   meta = with lib; {
     description = "A Python library for property based testing";
     homepage = "https://github.com/HypothesisWorks/hypothesis";
     license = licenses.mpl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }