diff --git a/ci/check_imports.py b/ci/check_imports.py index 3f09290f8c3758..19e48b659617f7 100644 --- a/ci/check_imports.py +++ b/ci/check_imports.py @@ -9,6 +9,7 @@ 'html5lib', 'ipython', 'jinja2' + 'hypothesis', 'lxml', 'numexpr', 'openpyxl', diff --git a/doc/source/install.rst b/doc/source/install.rst index 08be1960eb957f..4640da8b8239a2 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -202,7 +202,8 @@ pandas is equipped with an exhaustive set of unit tests, covering about 97% of the code base as of this writing. To run it on your machine to verify that everything is working (and that you have all of the dependencies, soft and hard, installed), make sure you have `pytest -`__ >= 3.6 and run: +`__ >= 3.6 and `Hypothesis +`__ >= 3.58, then run: :: diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index c96db94ba9c701..2e75ce8473c2f0 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -729,6 +729,7 @@ Build Changes ^^^^^^^^^^^^^ - Building pandas for development now requires ``cython >= 0.28.2`` (:issue:`21688`) +- Testing pandas now requires ``hypothesis>=3.58`` (:issue:22280). You can find `the Hypothesis docs here `_, and a pandas-specific introduction :ref:`in the contributing guide ` . - Other diff --git a/pandas/util/_tester.py b/pandas/util/_tester.py index d18467f17ec5bb..aad2f00fa04784 100644 --- a/pandas/util/_tester.py +++ b/pandas/util/_tester.py @@ -12,6 +12,10 @@ def test(extra_args=None): import pytest except ImportError: raise ImportError("Need pytest>=3.0 to run tests") + try: + import hypothesis # noqa + except ImportError: + raise ImportError("Need hypothesis>=3.58 to run tests") cmd = ['--skip-slow', '--skip-network'] if extra_args: if not isinstance(extra_args, list):